forked from mirrors/linphone-iphone
make sure random port is used if sip_random_port=1 and no transport selected
This commit is contained in:
parent
2cbe71c569
commit
3fdf79fdc5
2 changed files with 6 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit a1a296d106633ff6f250db46e991f53acf4f7991
|
||||
Subproject commit ec2d04150521197905bf5812991b54bab97fbdf8
|
||||
Loading…
Add table
Reference in a new issue