[Freeswitch-svn] [commit] r9275 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua tests
Freeswitch SVN
mikej at freeswitch.org
Tue Aug 12 13:06:35 EDT 2008
Author: mikej
Date: Tue Aug 12 13:06:35 2008
New Revision: 9275
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
freeswitch/trunk/libs/sofia-sip/tests/test_simple.c
Log:
Wed Aug 6 15:17:30 EDT 2008 Pekka Pessi <first.last at nokia.com>
* nua_subnotref.c: nua_unsubscribe() should not terminate usage w/ final response
Do not terminate until final NOTIFY or timeout.
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Tue Aug 12 13:06:35 2008
@@ -1 +1 @@
-Tue Aug 12 13:06:05 EDT 2008
+Tue Aug 12 13:06:30 EDT 2008
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c Tue Aug 12 13:06:35 2008
@@ -249,7 +249,7 @@
nua_dialog_usage_t *du = cr->cr_usage;
sip_time_t expires = 0;
- if (cr->cr_event != nua_r_subscribe || !du || du->du_shutdown)
+ if (cr->cr_event == nua_r_destroy || !du || du->du_shutdown)
cr->cr_terminating = 1;
if (du) {
@@ -281,7 +281,7 @@
nua_dialog_usage_reset_refresh(du); /* during SUBSCRIBE transaction */
- if (cr->cr_terminating)
+ if (cr->cr_terminating || cr->cr_event != nua_r_subscribe)
expires = eu->eu_delta = 0;
else if (sip->sip_expires)
/* Use value specified by application or negotiated with Min-Expires */
Modified: freeswitch/trunk/libs/sofia-sip/tests/test_simple.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_simple.c (original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_simple.c Tue Aug 12 13:06:35 2008
@@ -954,7 +954,10 @@
TEST(e->data->e_status, 200);
r_tags = e->data->e_tags;
TEST_1(tl_find(r_tags, nutag_substate));
- TEST(tl_find(r_tags, nutag_substate)->t_value, nua_substate_terminated);
+ if (en1 == a->events->head)
+ TEST(tl_find(r_tags, nutag_substate)->t_value, nua_substate_terminated);
+ else
+ TEST(tl_find(r_tags, nutag_substate)->t_value, nua_substate_active);
TEST_1(sip = sip_object(e->data->e_msg));
TEST_1(sip->sip_expires);
TEST_1(sip->sip_expires->ex_delta == 0);
More information about the Freeswitch-svn
mailing list