# HG changeset patch # User Sebastien Decugis # Date 1364218555 -3600 # Node ID e22434c661262a8916d743841ba34e3ee308ec2e # Parent d3d2a32320c4daf5fd828bc6ce3a1f004cac5804 Be more restrictive on fd_msg_send() called with answer messages, the function now rejects the parameters if an answer callback is provided diff -r d3d2a32320c4 -r e22434c66126 libfdproto/messages.c --- a/libfdproto/messages.c Fri Mar 22 14:48:28 2013 +0100 +++ b/libfdproto/messages.c Mon Mar 25 14:35:55 2013 +0100 @@ -1037,7 +1037,7 @@ CHECK_PARAMS( CHECK_MSG(msg) ); if (! (msg->msg_public.msg_flags & CMD_FLAG_REQUEST )) - return 0; /* we associate with requests only */ + return anscb ? EINVAL : 0; /* we associate with requests only */ CHECK_PARAMS( (anscb == NULL) || (msg->msg_cb.fct == NULL) ); /* We are not overwritting a cb */