[svn-commits] file: trunk r410472 - in /trunk: ./ res/res_pjsip_multihomed.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 12 07:51:38 CDT 2014


Author: file
Date: Wed Mar 12 07:51:34 2014
New Revision: 410472

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410472
Log:
res_pjsip_multihomed: Fix a bug where outgoing messages for TCP would go out using UDP.

This change fixes a bug where the code which changes the transport did not check whether
the message is going out over UDP or not before changing it. For TCP and TLS transports
we don't need to change the transport as the correct one is already chosen.
........

Merged revisions 410471 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_multihomed.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_pjsip_multihomed.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_multihomed.c?view=diff&rev=410472&r1=410471&r2=410472
==============================================================================
--- trunk/res/res_pjsip_multihomed.c (original)
+++ trunk/res/res_pjsip_multihomed.c Wed Mar 12 07:51:34 2014
@@ -102,9 +102,12 @@
 	}
 
 	/* If the transport it is going out on is different reflect it in the message */
-	transport = multihomed_get_udp_transport(&prm.ret_addr, prm.ret_port);
-	if (transport && (tdata->tp_info.transport != transport)) {
-		tdata->tp_info.transport = transport;
+	if (tdata->tp_info.transport->key.type == PJSIP_TRANSPORT_UDP ||
+		tdata->tp_info.transport->key.type == PJSIP_TRANSPORT_UDP6) {
+		transport = multihomed_get_udp_transport(&prm.ret_addr, prm.ret_port);
+		if (transport && (tdata->tp_info.transport != transport)) {
+			tdata->tp_info.transport = transport;
+		}
 	}
 
 	/* If the message needs to be updated with new address do so */




More information about the svn-commits mailing list