Commit 6db524c7 authored by dcoutadeur dcoutadeur's avatar dcoutadeur dcoutadeur

fix /status page in branch 1.4 and trunk (references #LEMONLDAP-727)



git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_4-bugfixes@3510 1dbb9719-a921-0410-b57f-c3a383c2c641
parent af752e3d
......@@ -62,7 +62,7 @@ macros
'$data1 = {'_whatToTrace' => '$_auth eq \'SAML\' ? "$_user\\@$_idpConfKey" : "$_user"'};'
whatToTrace
'$_whatToTrace'
'_whatToTrace'
loginHistoryEnabled
1
......
......@@ -199,11 +199,12 @@ sub lmSetApacheUser {
# Inform the status process of the result of the request if it is available.
sub updateStatus {
my ( $class, $user, $url, $action ) = splice @_;
my $statusPipe = $tsv->{statusPipe};
eval {
print { $tsv->{statusPipe} } "$user => "
print $statusPipe "$user => "
. $apacheRequest->hostname
. "$url $action\n"
if ( $tsv->{statusPipe} );
if ( $statusPipe );
};
}
......@@ -819,16 +820,18 @@ sub unlog ($$) {
# @return Apache2::Const::OK
sub status($$) {
my ( $class, $r ) = splice @_;
my $statusOut = $tsv->{statusOut};
my $statusPipe = $tsv->{statusPipe};
Lemonldap::NG::Handler::Main::Logger->lmLog( "$class: request for status",
'debug' );
return $class->abort("$class: status page can not be displayed")
unless ( $tsv->{statusPipe} and $tsv->{statusOut} );
unless ( $statusPipe and $statusOut );
$r->handler("perl-script");
print { $tsv->{statusPipe} } "STATUS"
. ( $r->args ? " " . $r->args : '' ) . "\n";
print $statusPipe "STATUS" . ( $r->args ? " " . $r->args : '' ) . "\n";
my $buf;
my $statusOut = $tsv->{statusOut};
while ($statusOut) {
while (<$statusOut>) {
last if (/^END$/);
$buf .= $_;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment