[Freeswitch-svn] [commit] r7418 - in freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua: nta nta/sofia-sip su
Author: mikej Date: Tue Jan 29 11:03:01 2008 New Revision: 7418 Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c Log: merge to sofia trunk (backport fixes from freeswitch and some new api's) Thu Jan 24 03:26:58 EST 2008 Pekka.Pessi@nokia.com * nta.c, sofia-sip.nta.h: added nta_leg_get_seq(), nta_leg_get_rseq() Mon Jan 28 09:27:03 EST 2008 Pekka.Pessi@nokia.com * su_alloc.c: su_free() handles NULL gracefully Patch by Michael Jerris. Mon Jan 28 09:30:48 EST 2008 Pekka.Pessi@nokia.com * su_root.c: try not to segfault in su_msg_destroy() Reduced window for race condition in su_msg_destroy(). Patch by Michael Jerris. Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c Tue Jan 29 11:03:01 2008 @@ -3920,6 +3920,18 @@ return NULL; } +/** Get local request sequence number. */ +uint32_t nta_leg_get_seq(nta_leg_t const *leg) +{ + return leg ? leg->leg_seq : 0; +} + +/** Get remote request sequence number. */ +uint32_t nta_leg_get_rseq(nta_leg_t const *leg) +{ + return leg ? leg->leg_rseq : 0; +} + /** Save target and route set at UAC side. * * @sa nta_leg_server_route(), @RFC3261 section 12.1.2 Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h Tue Jan 29 11:03:01 2008 @@ -210,6 +210,12 @@ /** Get remote tag. */ SOFIAPUBFUN char const *nta_leg_get_rtag(nta_leg_t const *leg); +/** Get local request sequence number. @NEW_1_12_9 */ +SOFIAPUBFUN uint32_t nta_leg_get_seq(nta_leg_t const *leg); + +/** Get remote request sequence number. @NEW_1_12_9 */ +SOFIAPUBFUN uint32_t nta_leg_get_rseq(nta_leg_t const *leg); + /** Set UAC route. */ SOFIAPUBFUN int nta_leg_client_route(nta_leg_t *leg, sip_record_route_t const *route, Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c Tue Jan 29 11:03:01 2008 @@ -780,7 +780,9 @@ */ void su_free(su_home_t *home, void *data) { - if (data) { + if (!data) + return; + if (home) { su_alloc_t *allocation; su_block_t *sub = MEMLOCK(home); Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c ============================================================================== --- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c (original) +++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c Tue Jan 29 11:03:01 2008 @@ -1046,10 +1046,13 @@ */ void su_msg_destroy(su_msg_r rmsg) { - su_msg_t *msg = rmsg[0]; + su_msg_t *msg; + assert(rmsg); rmsg[0] = NULL; + msg = rmsg[0], rmsg[0] = NULL; + if (msg) { SU_TASK_ZAP(msg->sum_to, su_msg_destroy); SU_TASK_ZAP(msg->sum_from, su_msg_destroy);
participants (1)
-
Freeswitch SVN