diff libfdproto/messages.c @ 824:89c5849b0832

Allow retransmission of messages on timeout
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 13 Sep 2012 13:41:29 +0200
parents c0a88c1bcc1e
children 254d81d21d0b
line wrap: on
line diff
--- a/libfdproto/messages.c	Wed Sep 12 20:43:51 2012 +0200
+++ b/libfdproto/messages.c	Thu Sep 13 13:41:29 2012 +0200
@@ -966,9 +966,9 @@
 	TRACE_ENTRY("%p %p %p", msg, anscb, data);
 	
 	/* Check the parameters */
-	CHECK_PARAMS( CHECK_MSG(msg) && anscb );
+	CHECK_PARAMS( CHECK_MSG(msg) );
 	CHECK_PARAMS( msg->msg_public.msg_flags & CMD_FLAG_REQUEST ); /* we associate with requests only */
-	CHECK_PARAMS( msg->msg_cb.fct == NULL ); /* No cb is already registered */
+	CHECK_PARAMS( (anscb == NULL) || (msg->msg_cb.fct == NULL) ); /* We are not overwritting a cb */
 	
 	/* Associate callback and data with the message, if any */
 	msg->msg_cb.fct = anscb;
"Welcome to our mercurial repository"