Mercurial > hg > freeDiameter
diff extensions/test_sip/locationinfo.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 | 79dd22145f52 |
line wrap: on
line diff
--- a/extensions/test_sip/locationinfo.c Thu Feb 14 15:58:55 2013 +0100 +++ b/extensions/test_sip/locationinfo.c Thu Feb 14 17:52:57 2013 +0100 @@ -41,7 +41,6 @@ struct dict_object * lir_model=NULL; struct msg * message=NULL; struct avp *avp=NULL; - struct session *sess=NULL; union avp_value value; //Fake values START @@ -61,15 +60,7 @@ // Create a new session { - CHECK_FCT( fd_sess_new( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, (os0_t)"appsip", 6 )); - 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)"appsip", CONSTSTRLEN("appsip") ) ); } //Add the Auth-Application-Id