Commit 2b8ad15a authored by Xavier Guimard's avatar Xavier Guimard

Replace remote_ip by client_addr for Apache-2.4 (#LEMONLDAP-933)

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_1_4-bugfixes@4767 1dbb9719-a921-0410-b57f-c3a383c2c641
parent 97500986
......@@ -410,12 +410,18 @@ sub retrieveSession {
sub ip {
my $ip = 'unknownIP';
eval 'use APR::SockAddr' unless ( $INC{'APR/SockAddr.pm'} );
eval {
$ip =
( MP() == 2 )
? $apacheRequest->connection->remote_ip
? (
Apache::Connection->can('remote_ip')
? $apacheRequest->connection->remote_ip
: $apacheRequest->connection->client_addr->ip_get
)
: $apacheRequest->remote_ip;
};
print STDERR "Error: $@\n" if ($@);
return $ip;
}
......
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