Module: kamailio
Branch: master
Commit: 8a678c244aa34cf352fb614693c6e6d505ce2dfe
URL:
https://github.com/kamailio/kamailio/commit/8a678c244aa34cf352fb614693c6e6d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-09-11T12:05:18+02:00
core: main - set default send tcp sockets to tls if no tcp is available
---
Modified: src/main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8a678c244aa34cf352fb614693c6e6d…
Patch:
https://github.com/kamailio/kamailio/commit/8a678c244aa34cf352fb614693c6e6d…
---
diff --git a/src/main.c b/src/main.c
index ba64af67db..5af5284c55 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1567,12 +1567,20 @@ int main_loop(void)
/* get first ipv4/ipv6 socket*/
if ((si->address.af==AF_INET)&&
((sendipv4_tls==0) ||
- (sendipv4_tls->flags&(SI_IS_LO|SI_IS_MCAST))))
+ (sendipv4_tls->flags&(SI_IS_LO|SI_IS_MCAST)))) {
sendipv4_tls=si;
+ if(sendipv4_tcp==0) {
+ sendipv4_tcp=si;
+ }
+ }
if( ((sendipv6_tls==0) ||
(sendipv6_tls->flags&(SI_IS_LO|SI_IS_MCAST))) &&
- (si->address.af==AF_INET6))
+ (si->address.af==AF_INET6)) {
sendipv6_tls=si;
+ if(sendipv6_tcp==0) {
+ sendipv6_tcp=si;
+ }
+ }
}
}
#endif /* USE_TLS */