# HG changeset patch # User Sebastien Decugis # Date 1353702174 -3600 # Node ID 8187364e39ea519422ceb82180a126e6c218b5a4 # Parent b2e8f1a3ef767acccf5e9b14b36850ea597decca Fix answers sending diff -r b2e8f1a3ef76 -r 8187364e39ea libfdproto/messages.c --- a/libfdproto/messages.c Mon Nov 19 08:58:40 2012 +0100 +++ b/libfdproto/messages.c Fri Nov 23 21:22:54 2012 +0100 @@ -975,7 +975,10 @@ /* Check the parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); - CHECK_PARAMS( msg->msg_public.msg_flags & CMD_FLAG_REQUEST ); /* we associate with requests only */ + + if (! (msg->msg_public.msg_flags & CMD_FLAG_REQUEST )) + return 0; /* we associate with requests only */ + CHECK_PARAMS( (anscb == NULL) || (msg->msg_cb.fct == NULL) ); /* We are not overwritting a cb */ /* Associate callback and data with the message, if any */