ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBServices.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBServices.pas (file contents):
Revision 4 by tony, Mon Jul 31 16:43:00 2000 UTC vs.
Revision 5 by tony, Fri Feb 18 16:26:16 2011 UTC

# Line 37 | Line 37
37  
38   unit IBServices;
39  
40 + {$Mode Delphi}
41 +
42   interface
43  
44   uses
45 <  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
45 > {$IFDEF LINUX }
46 >  unix,
47 > {$ELSE}
48 > {$DEFINE HAS_SQLMONITOR}
49 >  Windows,
50 > {$ENDIF}
51 >  Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
52    IBDialogs, IBHeader, IB, IBExternals;
53  
54   const
# Line 500 | Line 508 | type
508   implementation
509  
510   uses
511 <  IBIntf, IBSQLMonitor;
511 >  IBIntf {$IFDEF HAS_SQLMONITOR}, IBSQLMonitor {$ENDIF};
512  
513   { TIBCustomService }
514  
# Line 540 | Line 548 | begin
548    if Assigned(FOnAttach) then
549      FOnAttach(Self);
550  
551 +  {$IFDEF HAS_SQLMONITOR}
552    MonitorHook.ServiceAttach(Self);
553 +  {$ENDIF}
554   end;
555  
556   procedure TIBCustomService.Loaded;
# Line 634 | Line 644 | begin
644    FHandle := nil;
645    FLoginPrompt := True;
646    FTraceFlags := [];
647 +  FOutputbuffer := nil;
648   end;
649  
650   destructor TIBCustomService.Destroy;
# Line 646 | Line 657 | begin
657      FSPB := nil;
658      FParams.Free;
659    end;
660 +  ReallocMem(FOutputBuffer, 0);
661    inherited Destroy;
662   end;
663  
# Line 659 | Line 671 | begin
671    end
672    else
673      FHandle := nil;
674 +  {$IFDEF HAS_SQLMONITOR}
675    MonitorHook.ServiceDetach(Self);
676 +  {$ENDIF}
677   end;
678  
679   function TIBCustomService.GetActive: Boolean;
# Line 713 | Line 727 | begin
727      FQuerySPBLength := 0;
728      FQueryParams := '';
729    end;
730 +  {$IFDEF HAS_SQLMONITOR}
731    MonitorHook.ServiceQuery(Self);
732 +  {$ENDIF}
733   end;
734  
735   procedure TIBCustomService.SetActive(const Value: Boolean);
# Line 721 | Line 737 | begin
737    if csReading in ComponentState then
738      FStreamedActive := Value
739    else
740 <    if Value then
741 <      Attach
742 <    else
743 <      Detach;
740 >    if Value <> Active then  
741 >      if Value then
742 >        Attach
743 >      else
744 >        Detach;
745   end;
746  
747   procedure TIBCustomService.SetBufferSize(const Value: Integer);
# Line 1230 | Line 1247 | begin
1247      FStartSPBLength := 0;
1248      FStartParams := '';
1249    end;
1250 +  {$IFDEF HAS_SQLMONITOR}
1251    MonitorHook.ServiceStart(Self);
1252 +  {$ENDIF}
1253   end;
1254  
1255   procedure TIBControlService.ServiceStart;
# Line 1729 | Line 1748 | begin
1748    for i := 0 to High(FUserInfo) do
1749      FUserInfo[i].Free;
1750    FUserInfo := nil;
1751 <  inherited destroy;
1751 >  inherited Destroy;
1752   end;
1753  
1754   procedure TIBSecurityService.FetchUserInfo;
# Line 2043 | Line 2062 | end;
2062   destructor TDatabaseInfo.Destroy;
2063   begin
2064    DbName := nil;
2065 <  inherited;
2065 >  inherited Destroy;
2066   end;
2067  
2068   { TLicenseInfo }
# Line 2060 | Line 2079 | begin
2079    Key := nil;
2080    Id := nil;
2081    Desc := nil;
2082 <  inherited;
2082 >  inherited Destroy;
2083   end;
2084  
2085   { TConfigFileData }
# Line 2075 | Line 2094 | destructor TConfigFileData.Destroy;
2094   begin
2095    ConfigFileValue := nil;
2096    ConfigFileKey := nil;
2097 <  inherited;
2097 >  inherited Destroy;
2098   end;
2099  
2100   { TConfigParams }
# Line 2090 | Line 2109 | destructor TConfigParams.Destroy;
2109   begin
2110    ConfigFileData.Free;
2111    ConfigFileParams := nil;
2112 <  inherited;
2112 >  inherited Destroy;
2113   end;
2114  
2115   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines