Commit 3fdf79fd authored by jehan's avatar jehan
Browse files

make sure random port is used if sip_random_port=1 and no transport selected

parent 2cbe71c5
......@@ -1890,15 +1890,17 @@ int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports * t
if (lp_config_get_int(lc->config,"sip","sip_random_port",0)==1) {
/*legacy random mode*/
if (tr.udp_port>0 && random_port){
if (tr.udp_port>0){
tr.udp_port=random_port;
tr.tls_port=tr.tcp_port=0; /*make sure only one transport is active at a time*/
}else if (tr.tcp_port>0 && random_port){
}else if (tr.tcp_port>0){
tr.tcp_port=random_port;
tr.tls_port=tr.udp_port=0; /*make sure only one transport is active at a time*/
}else if (tr.tls_port>0 && random_port){
}else if (tr.tls_port>0){
tr.tls_port=random_port;
tr.udp_port=tr.tcp_port=0; /*make sure only one transport is active at a time*/
} else {
tr.udp_port=random_port;
}
}
if (tr.udp_port == LC_SIP_TRANSPORT_RANDOM) {
......
mediastreamer2 @ ec2d0415
Subproject commit a1a296d106633ff6f250db46e991f53acf4f7991
Subproject commit ec2d04150521197905bf5812991b54bab97fbdf8
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment