ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/fbintf/client/FBEvents.pas
(Generate patch)

Comparing:
ibx/trunk/fbintf/client/FBEvents.pas (file contents), Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC vs.
ibx/branches/journaling/fbintf/client/FBEvents.pas (file contents), Revision 362 by tony, Tue Dec 7 13:27:39 2021 UTC

# Line 83 | Line 83 | type
83      FEvents: TStringList;
84      FAttachment: IAttachment;
85      FEventCounts: TEventCounts;
86 +    FFirebirdClientAPI: TFBClientAPI;
87    protected
88      FEventBuffer: PByte;
89      FEventBufferLen: integer;
# Line 125 | Line 126 | var
126    EventNames: array of PAnsiChar;
127    EventName: AnsiString;
128   begin
129 <  with FirebirdClientAPI do
129 >  with FFirebirdClientAPI do
130    begin
131      if FEventBuffer <> nil then
132        isc_free( FEventBuffer);
# Line 138 | Line 139 | begin
139      try
140        for i := 0 to FEvents.Count-1 do
141        begin
142 <        EventName := FEvents[i];
142 >        EventName := FEvents[i];
143          EventNames[i] := PAnsiChar(EventName);
144        end;
145  
# Line 193 | Line 194 | begin
194  
195    FillChar(EventCountList,sizeof(EventCountList),0);
196  
197 <  with FirebirdClientAPI do
197 >  with FFirebirdClientAPI do
198       isc_event_counts( @EventCountList, FEventBufferLen, FEventBuffer, FResultBuffer);
199    j := 0;
200    P := @EventCountList;
# Line 216 | Line 217 | constructor TFBEvents.Create(DBAttachmen
217   begin
218    inherited Create(aMonitor);
219    FAttachment := DBAttachment;
220 +  FFirebirdClientAPI := DBAttachment.getFirebirdAPI as TFBClientAPI;
221    if Events.Count > MaxEvents then
222      IBError(ibxeMaximumEvents, [nil]);
223  
# Line 229 | Line 231 | destructor TFBEvents.Destroy;
231   begin
232    if assigned(FCriticalSection) then FCriticalSection.Free;
233    if assigned(FEvents) then FEvents.Free;
234 <  with FirebirdClientAPI do
234 >  with FFirebirdClientAPI do
235    begin
236      if FEventBuffer <> nil then
237        isc_free( FEventBuffer);
# Line 246 | Line 248 | end;
248  
249   procedure TFBEvents.SetEvents(EventNames: TStrings);
250   begin
251 +  {$ifdef Unix}
252 +  if (EventNames.Count > 0) and not IsMultiThread then
253 +    IBError(ibxeMultiThreadRequired,['Firebird Events Handling']);
254 +  {$endif}
255    if EventNames.Text <> FEvents.Text then
256    begin
257      Cancel;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines