[Freeswitch-trunk] [commit] r12376 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nua
FreeSWITCH SVN
mikej at freeswitch.org
Tue Mar 3 09:20:24 PST 2009
Author: mikej
Date: Tue Mar 3 11:20:24 2009
New Revision: 12376
Log:
Thu Feb 26 15:39:37 CST 2009 Pekka Pessi <first.last at nokia.com>
* nua/check_simple.c: removed extra debug logging, fixed 6.3.4 name
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_simple.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Tue Mar 3 11:20:24 2009
@@ -1 +1 @@
-Tue Mar 3 11:19:17 CST 2009
+Tue Mar 3 11:20:05 CST 2009
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_simple.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_simple.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/check_simple.c Tue Mar 3 11:20:24 2009
@@ -711,7 +711,7 @@
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 @@
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),
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c Tue Mar 3 11:20:24 2009
@@ -1767,11 +1767,23 @@
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 @@
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);
More information about the Freeswitch-trunk
mailing list