Mercurial > hg > freeDiameter
diff libfdproto/messages.c @ 1009:e22434c66126
Be more restrictive on fd_msg_send() called with answer messages, the function now rejects the parameters if an answer callback is provided
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 25 Mar 2013 14:35:55 +0100 |
parents | 1b0b1ab77be5 |
children | 908ffbb81f60 |
line wrap: on
line diff
--- 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 */