Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdproto.h @ 1014:908ffbb81f60
Added a second callback in fd_msg_send_timeout to handle more easily the timeout situation
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 29 Mar 2013 17:30:59 +0800 |
parents | 91d6555d508d |
children | 6fcd30ce3ce7 |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Fri Mar 29 17:11:45 2013 +0800 +++ b/include/freeDiameter/libfdproto.h Fri Mar 29 17:30:59 2013 +0800 @@ -2426,21 +2426,22 @@ * FUNCTION: fd_msg_anscb_associate, fd_msg_anscb_get * * PARAMETERS: - * msg : the answer message + * msg : the request message * anscb : the callback to associate with the message * data : the data to pass to the callback + * expirecb : the expiration callback to associate with the message * timeout : (optional, use NULL if no timeout) a timeout associated with calling the cb. * * DESCRIPTION: - * Associate or retrieve a callback with an answer message. + * Associate or retrieve callbacks with an message. * This is meant to be called from the daemon only. * * RETURN VALUE: * 0 : ok * EINVAL: a parameter is invalid */ -int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void * data, const struct timespec *timeout ); -int fd_msg_anscb_get ( struct msg * msg, void (**anscb)(void *, struct msg **), void ** data ); +int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ); +int fd_msg_anscb_get( struct msg * msg, void (**anscb)(void *, struct msg **), void (**expirecb)(void *, DiamId_t, size_t, struct msg **), void ** data ); struct timespec *fd_msg_anscb_gettimeout( struct msg * msg ); /* returns NULL or a valid non-0 timespec */ /*