[Freeswitch-svn] [commit] r9274 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta
Freeswitch SVN
mikej at freeswitch.org
Tue Aug 12 13:06:11 EDT 2008
Author: mikej
Date: Tue Aug 12 13:06:11 2008
New Revision: 9274
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
Log:
Wed Aug 6 14:49:13 EDT 2008 Pekka Pessi <first.last at nokia.com>
* nta: fix to #2037585: always release error callback when changing transports
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:11 2008
@@ -1 +1 @@
-Tue Aug 12 13:04:52 EDT 2008
+Tue Aug 12 13:06:05 EDT 2008
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 Aug 12 13:06:11 2008
@@ -7343,6 +7343,12 @@
orq->orq_tport = tport_ref(tp);
+ if (orq->orq_pending && tp != old_tp) {
+ tport_release(old_tp, orq->orq_pending,
+ orq->orq_request, NULL, orq, 0);
+ orq->orq_pending = 0;
+ }
+
if (old_tp) tport_unref(old_tp);
if (outgoing_insert_via(orq, agent_tport_via(tp)) < 0) {
@@ -7441,6 +7447,12 @@
if (orq->orq_try_udp_instead)
tag = tptag_mtu, value = 65535;
+ if (orq->orq_pending) {
+ tport_release(orq->orq_tport, orq->orq_pending,
+ orq->orq_request, NULL, orq, 0);
+ orq->orq_pending = 0;
+ }
+
tp = tport_tsend(orq->orq_tport, msg, tpn,
tag, value,
IF_SIGCOMP_TPTAG_COMPARTMENT(cc)
@@ -7477,12 +7489,6 @@
}
}
- if (orq->orq_pending && orq->orq_tport)
- tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
- NULL, orq, 0);
-
- orq->orq_pending = 0;
-
outgoing_tport_error(agent, orq, NULL, orq->orq_request, err);
return;
@@ -7548,6 +7554,8 @@
tport_t *tp;
tp_name_t tpn[1];
+ assert(orq->orq_pending == 0);
+
*tpn = *orq->orq_tpn;
tpn->tpn_proto = "tcp";
orq->orq_try_tcp_instead = 1;
@@ -7568,8 +7576,9 @@
return;
}
+ /* No TCP - try again with UDP without SIP MTU limit */
tpn->tpn_proto = "udp";
- orq->orq_try_udp_instead = 1; /* Try again without SIP MTU limit */
+ orq->orq_try_udp_instead = 1;
tp = tport_by_name(orq->orq_agent->sa_tports, tpn);
if (tp && tp != orq->orq_tport) {
@@ -7587,6 +7596,12 @@
tport_t *tp;
tp_name_t tpn[1];
+ if (orq->orq_pending) {
+ tport_release(orq->orq_tport, orq->orq_pending,
+ orq->orq_request, NULL, orq, 0);
+ orq->orq_pending = 0;
+ }
+
*tpn = *orq->orq_tpn;
tpn->tpn_proto = "udp";
orq->orq_try_udp_instead = 1;
More information about the Freeswitch-svn
mailing list