Mercurial > hg > freeDiameter
diff extensions/app_sip/registrationtermination.c @ 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 | 4ffbc9f1e922 |
children | 0117a7746b21 |
line wrap: on
line diff
--- a/extensions/app_sip/registrationtermination.c Thu Feb 14 15:58:55 2013 +0100 +++ b/extensions/app_sip/registrationtermination.c Thu Feb 14 17:52:57 2013 +0100 @@ -147,15 +147,7 @@ // Create a new session { #define APP_SIP_SID_OPT "app_sip" - CHECK_FCT( fd_sess_new( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, (os0_t)APP_SIP_SID_OPT, CONSTSTRLEN(APP_SIP_SID_OPT) )); - os0_t sid; - size_t sidlen; - CHECK_FCT( fd_sess_getsid ( sess, &sid, &sidlen )); - CHECK_FCT( fd_msg_avp_new ( sip_dict.Session_Id, 0, &avp )); - value.os.data = sid; - value.os.len = sidlen; - CHECK_FCT( fd_msg_avp_setvalue( avp, &value )); - CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_FIRST_CHILD, avp )); + CHECK_FCT( fd_msg_new_session( message, (os0_t)APP_SIP_SID_OPT, CONSTSTRLEN(APP_SIP_SID_OPT) ) ); } //Add the Auth-Application-Id