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
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410472
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
/* 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 */