@@ -914,16 +914,30 @@ static int do_errorlog_default(const ap_errorlog_info *info, char *buf,
914
914
* a scoreboard handle, it is likely a client.
915
915
*/
916
916
if (info -> r ) {
917
- len += apr_snprintf (buf + len , buflen - len , "[%s %s:%d] " ,
917
+ apr_os_sock_t fd = -1 ;
918
+ apr_socket_t * csd = ap_get_conn_socket (info -> r -> connection );
919
+ if (csd ) {
920
+ apr_os_sock_get (& fd , csd );
921
+ }
922
+
923
+ len += apr_snprintf (buf + len , buflen - len , "[%s %s:%d/%d] " ,
918
924
info -> r -> connection -> outgoing ? "remote" : "client" ,
919
925
info -> r -> useragent_ip ,
920
- info -> r -> useragent_addr ? info -> r -> useragent_addr -> port : 0 );
926
+ info -> r -> useragent_addr ? info -> r -> useragent_addr -> port : 0 ,
927
+ (int )fd );
921
928
}
922
929
else if (info -> c ) {
923
- len += apr_snprintf (buf + len , buflen - len , "[%s %s:%d] " ,
930
+ apr_os_sock_t fd = -1 ;
931
+ apr_socket_t * csd = ap_get_conn_socket ((conn_rec * )info -> c );
932
+ if (csd ) {
933
+ apr_os_sock_get (& fd , csd );
934
+ }
935
+
936
+ len += apr_snprintf (buf + len , buflen - len , "[%s %s:%d/%d] " ,
924
937
info -> c -> outgoing ? "remote" : "client" ,
925
938
info -> c -> client_ip ,
926
- info -> c -> client_addr ? info -> c -> client_addr -> port : 0 );
939
+ info -> c -> client_addr ? info -> c -> client_addr -> port : 0 ,
940
+ (int )fd );
927
941
}
928
942
929
943
/* the actual error message */
0 commit comments