[Freeswitch-svn] [commit] r8332 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta
Freeswitch SVN
mikej at freeswitch.org
Fri May 9 13:42:47 EDT 2008
Author: mikej
Date: Fri May 9 13:42:46 2008
New Revision: 8332
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
Log:
Wed May 7 09:10:28 EDT 2008 Pekka Pessi <first.last at nokia.com>
* nta.c: do not replace host:port in user-specified Via header
Note that port for UDP is replaced if request is stateful and there is no
rport.
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Fri May 9 13:42:46 2008
@@ -1 +1 @@
-Wed May 7 08:28:38 EDT 2008
+Fri May 9 13:42:29 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 Fri May 9 13:42:46 2008
@@ -2063,11 +2063,16 @@
clear = 1, v->v_protocol = via->v_protocol;
/* XXX - should we do this? */
- if (via->v_host != v->v_host &&
+ if (!user_via &&
+ via->v_host != v->v_host &&
str0cmp(via->v_host, v->v_host))
clear = 1, v->v_host = via->v_host;
- if (via->v_port != v->v_port &&
+ if ((!user_via ||
+ /* Replace port in user Via only if we use udp and no rport */
+ (v->v_protocol == sip_transport_udp && !v->v_rport &&
+ !orq->orq_stateless)) &&
+ via->v_port != v->v_port &&
str0cmp(via->v_port, v->v_port))
clear = 1, v->v_port = via->v_port;
More information about the Freeswitch-svn
mailing list