]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Thu Feb 26 15:39:37 CST 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Tue, 3 Mar 2009 17:20:24 +0000 (17:20 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 3 Mar 2009 17:20:24 +0000 (17:20 +0000)
  * nua/check_simple.c: removed extra debug logging, fixed 6.3.4 name

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

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nua/check_simple.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c

index d606913085a926c85cd123fe882ab6377018511a..3cc4a08fd48413a43eb32000a8b3b9763f594414 100644 (file)
@@ -1 +1 @@
-Tue Mar  3 11:19:17 CST 2009
+Tue Mar  3 11:20:05 CST 2009
index 2e2bffc61ddc12014751ea7716b47b9b811460f3..d122a3bff1511dedb58b2bde99389fd2a813895f 100644 (file)
@@ -711,7 +711,7 @@ START_TEST(notify_6_3_4)
   struct event *response;
   sip_t *sip;
 
-  s2_case("6.3.3", "NOTIFY server - terminate with error response to NOTIFY",
+  s2_case("6.3.4", "NOTIFY server - terminate with error response to NOTIFY",
          "NUA receives SUBSCRIBE, sends 202 and NOTIFY. "
          "The subscription terminates when watcher "
          "returns 481 to second NOTIFY. The queued 3rd NOTIFY gets "
@@ -719,9 +719,6 @@ START_TEST(notify_6_3_4)
 
   nh = subscribe_to_nua("presence", SIPTAG_EXPIRES_STR("300"), TAG_END());
 
-  tport_set_params(s2->master, TPTAG_LOG(1), TAG_END());
-  s2_setup_logs(7);
-
   nua_notify(nh,
             NUTAG_SUBSTATE(nua_substate_active),
             SIPTAG_PAYLOAD_STR(presence_closed),
index 6257dbaa5996bb10e7357f2879e4e312cae743b5..bec5b082e9ccf0d2d7c1fae0236804e76041365d 100644 (file)
@@ -1767,11 +1767,23 @@ static int nua_prack_client_request(nua_client_request_t *cr,
   else if (nh->nh_soa == NULL) {
     offer_sent = session_get_description(sip, NULL, NULL);
   }
-  /* When 100rel response status was 183 do support for preconditions */
-  else if (ss->ss_precondition && cri->cr_status == 183 &&
-          cri->cr_offer_sent && cri->cr_answer_recv) {
-    if (soa_generate_offer(nh->nh_soa, 0, NULL) < 0 ||
-       session_include_description(nh->nh_soa, 1, msg, sip) < 0) {
+  else {
+    /* When 100rel response status was 183 do support for preconditions */
+    int send_offer = ss->ss_precondition &&
+      cri->cr_status == 183 && cri->cr_offer_sent && cri->cr_answer_recv;
+
+    if (!send_offer) {
+      tagi_t const *t = tl_find_last(tags, nutag_include_extra_sdp);
+      send_offer = t && t->t_value;
+    }
+
+    if (!send_offer) {
+    }
+    else if (soa_generate_offer(nh->nh_soa, 0, NULL) >= 0 &&
+            session_include_description(nh->nh_soa, 1, msg, sip) >= 0) {
+      offer_sent = 1;
+    }
+    else {
       status = soa_error_as_sip_response(nh->nh_soa, &phrase);
       SU_DEBUG_3(("nua(%p): PRACK offer: %d %s\n", (void *)nh,
                  status, phrase));
@@ -1779,9 +1791,6 @@ static int nua_prack_client_request(nua_client_request_t *cr,
                      nua_i_media_error, status, phrase, NULL);
       return nua_client_return(cr, status, phrase, msg);
     }
-    else {
-      offer_sent = 1;
-    }
   }
 
   retval = nua_base_client_request(cr, msg, sip, NULL);