changeset 901:a3eed6420b5b

Log incoming messages on new connections too
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 07 Dec 2012 20:54:33 +0100
parents a7e0a7ab769c
children 42d0a08cffa8
files libfdcore/server.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/server.c	Fri Dec 07 20:43:07 2012 +0100
+++ b/libfdcore/server.c	Fri Dec 07 20:54:33 2012 +0100
@@ -167,6 +167,9 @@
 	/* Try parsing this message */
 	CHECK_FCT_DO( fd_msg_parse_buffer( &buf, bufsz, &msg ), /* Parsing failed */ goto cleanup );
 	
+	/* Log incoming message */
+	fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from new client '%s'", bufsz, fd_cnx_getid(c->conn) );
+	
 	/* We expect a CER, it must parse with our dictionary and rules */
 	CHECK_FCT_DO( fd_msg_parse_rules( msg, fd_g_config->cnf_dict, NULL ), /* Parsing failed -- trace details ? */ goto cleanup );
 	
"Welcome to our mercurial repository"