From: Fabian Keil Date: Tue, 4 Sep 2012 08:39:58 +0000 (+0000) Subject: Relocate the connection-accepted message from listen_loop() to serve() X-Git-Tag: v_3_0_20~278 X-Git-Url: http://www.privoxy.org/gitweb/show-status?a=commitdiff_plain;h=66287346ba7a6d1ca2335ea254ec9f344e4aeb49;p=privoxy.git Relocate the connection-accepted message from listen_loop() to serve() This way it's printed by the thread that is actually serving the connection which is nice when grepping for thread ids in log files. While at it, use an upper-case first character which is more consistent with the other log messages. --- diff --git a/jcc.c b/jcc.c index c1ed36a6..32e6f0d8 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.386 2012/07/27 17:41:42 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.387 2012/09/04 08:37:51 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2507,6 +2507,9 @@ static void serve(struct client_state *csp) #endif /* def FEATURE_CONNECTION_SHARING */ int continue_chatting = 0; + log_error(LOG_LEVEL_CONNECT, "Accepted connection from %s on socket %d", + csp->ip_addr_str, csp->cfd); + do { unsigned int latency; @@ -3554,12 +3557,6 @@ static void listen_loop(void) freez(csp_list); continue; } - else - { - log_error(LOG_LEVEL_CONNECT, - "accepted connection from %s on socket %d", - csp->ip_addr_str, csp->cfd); - } csp->flags |= CSP_FLAG_ACTIVE; csp->server_connection.sfd = JB_INVALID_SOCKET;