diff include/freeDiameter/libfdproto.h @ 924:877592751fee

Fix (tentative) for invalid handling of sessions fast creation/destruction as pointed by Yusuke Okura -- http://lists.freediameter.net/pipermail/help/2013-February/000584.html and http://lists.freediameter.net/pipermail/help/2013-February/000589.html -- Thank you very much
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 14 Feb 2013 17:52:57 +0100
parents c7bf1a7a4e90
children 5053f1abcf5d 51c15f98a965
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Thu Feb 14 15:58:55 2013 +0100
+++ b/include/freeDiameter/libfdproto.h	Thu Feb 14 17:52:57 2013 +0100
@@ -1815,9 +1815,9 @@
  *  If diamId is NULL, the string is exactly the content of opt.
  *
  * RETURN VALUE:
- *  0      	: The session is created.
+ *  0      	: The session is created, the initial msg refcount is 1.
  *  EINVAL 	: A parameter is invalid.
- *  EALREADY	: A session with the same name already exists (returned in *session)
+ *  EALREADY	: A session with the same name already exists (returned in *session), the msg refcount is increased.
  *  ENOMEM	: Not enough memory to complete the operation
  */
 int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen, uint8_t * opt, size_t optlen );
@@ -2504,6 +2504,10 @@
  */
 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * isnew);
 
+/* This one is used by the libfdcore, you should use fd_msg_new_session rather than fd_sess_new, when possible */
+int fd_msg_sess_set(struct msg * msg, struct session * session);
+
+
 /***************************************/
 /*   Manage AVP values                 */
 /***************************************/
"Welcome to our mercurial repository"