]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fri May 16 10:29:20 EDT 2008 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 16:54:14 +0000 (16:54 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 16:54:14 +0000 (16:54 +0000)
  * test_simple.c: fixed test case for SUBSCRIBE

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8463 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/tests/test_simple.c

index 699c0fd0aafb1447f434ac027ce48f632bd2bf95..683a55a6086ab493c77d5334e52be74912665846 100644 (file)
@@ -1 +1 @@
-Wed May 14 14:21:05 EDT 2008
+Mon May 19 12:54:07 EDT 2008
index 1fdb7ae32f428a4abfae6d433a85ac970c5c7e64..1f0010925be715eb920bba8fe13694ddbea97303 100644 (file)
@@ -641,8 +641,6 @@ int accept_and_notify(CONDITION_PARAMS)
   switch (event) {
   case nua_i_subscribe:
     if (status < 200) {
-      int fetch = sip->sip_expires && sip->sip_expires->ex_delta == 0;
-
       RESPOND(ep, call, nh, SIP_202_ACCEPTED,
              NUTAG_WITH(with),
              SIPTAG_EXPIRES_STR("360"),
@@ -653,11 +651,8 @@ int accept_and_notify(CONDITION_PARAMS)
             SIPTAG_EVENT(sip->sip_event),
             SIPTAG_CONTENT_TYPE_STR("application/pidf+xml"),
             SIPTAG_PAYLOAD_STR(presence_closed),
-            NUTAG_SUBSTATE(fetch
-                           ? nua_substate_pending
-                           : nua_substate_terminated),
+            NUTAG_SUBSTATE(nua_substate_pending),
             TAG_END());
-
     }
     return 0;
 
@@ -1020,6 +1015,10 @@ int test_subscribe_notify_graceful(struct context *ctx)
   if (print_headings)
     printf("TEST NUA-11.5.1: establishing subscription\n");
 
+  nua_set_params(b->nua, NUTAG_APPL_METHOD("NOTIFY"),
+                TAG_END());
+  run_b_until(ctx, nua_r_set_params, until_final_response);
+
   TEST_1(a_call->nh = nua_handle(a->nua, a_call, SIPTAG_TO(b->to), TAG_END()));
 
   SUBSCRIBE(a, a_call, a_call->nh, NUTAG_URL(b->contact->m_url),
@@ -2092,8 +2091,8 @@ int test_simple(struct context *ctx)
     || test_publish(ctx)
     || test_subscribe_notify(ctx)
     || test_event_fetch(ctx)
-    || test_subscribe_notify_graceful(ctx)
     || test_newsub_notify(ctx)
+    || test_subscribe_notify_graceful(ctx)
     || test_subscription_timeout(ctx)
     ;
 }