* Set the global CustomApplication variable, usefull for logging

git-svn-id: trunk@15622 -
This commit is contained in:
joost 2010-07-21 11:02:45 +00:00
parent b5a6d94593
commit c024cbfb4c
3 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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