From f97af64425217bc0c55bfbe0ebaf3df5a430adee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Tue, 15 Apr 2014 20:08:35 -0400 Subject: [PATCH] sip: transport key handle STUN Issue: #45416 --- daemon/src/sip/siptransport.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/src/sip/siptransport.cpp b/daemon/src/sip/siptransport.cpp index bc87f8051f..e3791b5b23 100644 --- a/daemon/src/sip/siptransport.cpp +++ b/daemon/src/sip/siptransport.cpp @@ -75,7 +75,10 @@ namespace { std::string transportMapKey(const std::string &interface, int port, pjsip_transport_type_e type) { std::ostringstream os; - char af_ver_num = (pjsip_transport_type_get_af(type) == pj_AF_INET6()) ? '6' : '4'; + auto family = pjsip_transport_type_get_af(type); + char af_ver_num = (family == pj_AF_INET6()) ? '6' : '4'; + if (type == PJSIP_TRANSPORT_START_OTHER) // STUN + type = (family == pj_AF_INET6()) ? PJSIP_TRANSPORT_UDP6 : PJSIP_TRANSPORT_UDP; os << interface << ':' << port << ':' << pjsip_transport_get_type_name(type) << af_ver_num; return os.str(); } -- GitLab