Wed May 7 09:10:28 EDT 2008 Pekka Pessi <first.last@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.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8332 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-09 17:42:46 +00:00
parent c35fb67e11
commit f39b423778
2 changed files with 8 additions and 3 deletions

View File

@ -1 +1 @@
Wed May 7 08:28:38 EDT 2008 Fri May 9 13:42:29 EDT 2008

View File

@ -2063,11 +2063,16 @@ int outgoing_insert_via(nta_outgoing_t *orq,
clear = 1, v->v_protocol = via->v_protocol; clear = 1, v->v_protocol = via->v_protocol;
/* XXX - should we do this? */ /* 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)) str0cmp(via->v_host, v->v_host))
clear = 1, v->v_host = via->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)) str0cmp(via->v_port, v->v_port))
clear = 1, v->v_port = via->v_port; clear = 1, v->v_port = via->v_port;