diff options
author | Rob Crittenden <rcritten@redhat.com> | 2015-09-30 20:32:46 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2015-10-02 16:51:56 -0400 |
commit | 979a74f6ce2e61fb607414d9ce5f39226630bab2 (patch) | |
tree | c5801695e918d87af2e0d02ded72ec08b09f4e14 /nss_engine_io.c | |
parent | d42edc43ef8bd40897f5dc599eb4c02b7e69e4b2 (diff) | |
download | mod_nss-979a74f6ce2e61fb607414d9ce5f39226630bab2.tar.gz mod_nss-979a74f6ce2e61fb607414d9ce5f39226630bab2.tar.xz mod_nss-979a74f6ce2e61fb607414d9ce5f39226630bab2.zip |
Fix compatibility with RHEL 6.x (Apache 2.2.x and NSS 3.15.1)
Diffstat (limited to 'nss_engine_io.c')
-rw-r--r-- | nss_engine_io.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nss_engine_io.c b/nss_engine_io.c index f1ac69c..1360748 100644 --- a/nss_engine_io.c +++ b/nss_engine_io.c @@ -621,13 +621,21 @@ static apr_status_t nss_filter_io_shutdown(nss_filter_ctx_t *filter_ctx, PR_Close(ssl); /* log the fact that we've closed the connection */ +#if AP_SERVER_MINORVERSION_NUMBER <= 2 + if (c->base_server->loglevel >= APLOG_INFO) { +#else if (c->base_server->log.level >= APLOG_INFO) { +#endif ap_log_error(APLOG_MARK, APLOG_INFO, 0, c->base_server, "Connection to child %ld closed " "(server %s, client %s)", c->id, nss_util_vhostid(c->pool, c->base_server), +#if AP_SERVER_MINORVERSION_NUMBER <= 2 + c->remote_ip ? c->remote_ip : "unknown"); +#else c->client_ip ? c->client_ip : "unknown"); +#endif } /* deallocate the SSL connection */ @@ -1167,7 +1175,11 @@ static PRStatus PR_CALLBACK nspr_filter_getpeername(PRFileDesc *fd, PRNetAddr *a filter_ctx = (nss_filter_ctx_t *)(fd->secret); c = filter_ctx->c; +#if AP_SERVER_MINORVERSION_NUMBER <= 2 + return PR_StringToNetAddr(c->remote_ip, addr); +#else return PR_StringToNetAddr(c->client_ip, addr); +#endif } /* |