mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix transport selection for outgoing messages when the proxy config selected has sips.
This commit is contained in:
parent
b9f614744f
commit
55af0b6aa5
2 changed files with 5 additions and 12 deletions
|
|
@ -2417,18 +2417,12 @@ static MSList *make_routes_for_proxy(LinphoneProxyConfig *proxy, const LinphoneA
|
|||
ret=ms_list_append(ret,sal_address_clone((SalAddress*)srv_route));
|
||||
}
|
||||
if (ret==NULL){
|
||||
/*still no route, so try to build a route from proxy transport + identity host,
|
||||
*in order to force using the transport required for this proxy, if any.*/
|
||||
/*if the proxy address matches the domain part of the destination, then use the same transport
|
||||
* as the one used for registration. This is done by forcing a route to this proxy.*/
|
||||
SalAddress *proxy_addr=sal_address_new(linphone_proxy_config_get_addr(proxy));
|
||||
const char *transport=sal_address_get_transport_name(proxy_addr);
|
||||
if (transport){
|
||||
SalAddress *route=sal_address_new(NULL);
|
||||
sal_address_set_domain(route,sal_address_get_domain((SalAddress*)dest));
|
||||
sal_address_set_port(route,sal_address_get_port((SalAddress*)dest));
|
||||
sal_address_set_transport_name(route,transport);
|
||||
ret=ms_list_append(ret,route);
|
||||
}
|
||||
sal_address_destroy(proxy_addr);
|
||||
if (strcmp(sal_address_get_domain(proxy_addr),linphone_address_get_domain(dest))==0){
|
||||
ret=ms_list_append(ret,proxy_addr);
|
||||
}else sal_address_destroy(proxy_addr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1139,7 +1139,6 @@ static gboolean apply_transports(PortConfigCtx *ctx){
|
|||
linphone_core_get_sip_transports(lc,&tp);
|
||||
tp.udp_port=ctx->tp.udp_port;
|
||||
tp.tcp_port=ctx->tp.tcp_port;
|
||||
g_message("new transports: %i, %i, %i",(int)tp.udp_port,(int)tp.tcp_port,(int)tp.tls_port);
|
||||
linphone_core_set_sip_transports(lc,&tp);
|
||||
g_object_set_data(G_OBJECT(mw),"port_config",NULL);
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue