Skip to content

Commit b7c3105

Browse files
committed
Show where the csd/ptrans get cleared..
1 parent 7ab5d42 commit b7c3105

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

server/log.c

+18-4
Original file line numberDiff line numberDiff line change
@@ -914,16 +914,30 @@ static int do_errorlog_default(const ap_errorlog_info *info, char *buf,
914914
* a scoreboard handle, it is likely a client.
915915
*/
916916
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] ",
918924
info->r->connection->outgoing ? "remote" : "client",
919925
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);
921928
}
922929
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] ",
924937
info->c->outgoing ? "remote" : "client",
925938
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);
927941
}
928942

929943
/* the actual error message */

0 commit comments

Comments
 (0)