Mercurial > hg > freeDiameter
comparison 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 |
comparison
equal
deleted
inserted
replaced
923:6a4d08e239bd | 924:877592751fee |
---|---|
1813 * high32 and low32 are the parts of a monotonic 64 bits counter initialized to (time, 0) at startup. | 1813 * high32 and low32 are the parts of a monotonic 64 bits counter initialized to (time, 0) at startup. |
1814 * opt is an optional string that can be concatenated to the identifier. | 1814 * opt is an optional string that can be concatenated to the identifier. |
1815 * If diamId is NULL, the string is exactly the content of opt. | 1815 * If diamId is NULL, the string is exactly the content of opt. |
1816 * | 1816 * |
1817 * RETURN VALUE: | 1817 * RETURN VALUE: |
1818 * 0 : The session is created. | 1818 * 0 : The session is created, the initial msg refcount is 1. |
1819 * EINVAL : A parameter is invalid. | 1819 * EINVAL : A parameter is invalid. |
1820 * EALREADY : A session with the same name already exists (returned in *session) | 1820 * EALREADY : A session with the same name already exists (returned in *session), the msg refcount is increased. |
1821 * ENOMEM : Not enough memory to complete the operation | 1821 * ENOMEM : Not enough memory to complete the operation |
1822 */ | 1822 */ |
1823 int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen, uint8_t * opt, size_t optlen ); | 1823 int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen, uint8_t * opt, size_t optlen ); |
1824 | 1824 |
1825 /* | 1825 /* |
2502 * 0 : success | 2502 * 0 : success |
2503 * !0 : standard error code. | 2503 * !0 : standard error code. |
2504 */ | 2504 */ |
2505 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * isnew); | 2505 int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * isnew); |
2506 | 2506 |
2507 /* This one is used by the libfdcore, you should use fd_msg_new_session rather than fd_sess_new, when possible */ | |
2508 int fd_msg_sess_set(struct msg * msg, struct session * session); | |
2509 | |
2510 | |
2507 /***************************************/ | 2511 /***************************************/ |
2508 /* Manage AVP values */ | 2512 /* Manage AVP values */ |
2509 /***************************************/ | 2513 /***************************************/ |
2510 | 2514 |
2511 /* | 2515 /* |