mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 15:07:27 +01:00
* Set the global CustomApplication variable, usefull for logging
git-svn-id: trunk@15622 -
This commit is contained in:
parent
b5a6d94593
commit
c024cbfb4c
@ -164,6 +164,8 @@ Var
|
||||
|
||||
Implementation
|
||||
|
||||
uses CustApp;
|
||||
|
||||
resourcestring
|
||||
SErrNoModuleNameForRequest = 'Could not determine HTTP module name for request';
|
||||
SErrNoModuleForRequest = 'Could not determine HTTP module for request "%s"';
|
||||
@ -180,12 +182,16 @@ Procedure InitApache;
|
||||
|
||||
begin
|
||||
Application:=TCustomApacheApplication.Create(Nil);
|
||||
if not assigned(CustomApplication) then
|
||||
CustomApplication := Application;
|
||||
end;
|
||||
|
||||
Procedure DoneApache;
|
||||
|
||||
begin
|
||||
Try
|
||||
if CustomApplication=Application then
|
||||
CustomApplication := nil;
|
||||
FreeAndNil(Application);
|
||||
except
|
||||
if ShowCleanUpErrors then
|
||||
|
||||
@ -38,13 +38,16 @@ Procedure InitCGI;
|
||||
|
||||
begin
|
||||
Application:=TCGIApplication.Create(Nil);
|
||||
CustomApplication:=Application;
|
||||
if not assigned(CustomApplication) then
|
||||
CustomApplication := Application;
|
||||
end;
|
||||
|
||||
Procedure DoneCGI;
|
||||
|
||||
begin
|
||||
Try
|
||||
if CustomApplication=Application then
|
||||
CustomApplication := nil;
|
||||
FreeAndNil(Application);
|
||||
except
|
||||
if ShowCleanUpErrors then
|
||||
|
||||
@ -31,16 +31,22 @@ Var
|
||||
|
||||
Implementation
|
||||
|
||||
uses CustApp;
|
||||
|
||||
Procedure InitFCGI;
|
||||
|
||||
begin
|
||||
Application:=TFCGIApplication.Create(Nil);
|
||||
if not assigned(CustomApplication) then
|
||||
CustomApplication := Application;
|
||||
end;
|
||||
|
||||
Procedure DoneFCGI;
|
||||
|
||||
begin
|
||||
Try
|
||||
if CustomApplication=Application then
|
||||
CustomApplication := nil;
|
||||
FreeAndNil(Application);
|
||||
except
|
||||
if ShowCleanUpErrors then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user