[sr-dev] git:5.6:9b8f927f: tm: fix kemi t_relay_to_proto() variants for tls

Daniel-Constantin Mierla miconda at gmail.com
Mon May 23 08:19:06 CEST 2022


Module: kamailio
Branch: 5.6
Commit: 9b8f927f613f1666af19347b928a099a208a8d71
URL: https://github.com/kamailio/kamailio/commit/9b8f927f613f1666af19347b928a099a208a8d71

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-05-23T08:07:03+02:00

tm: fix kemi t_relay_to_proto() variants for tls

(cherry picked from commit 1f7e894f5b293f97dc99e1b7e5d06159f91a96f7)

---

Modified: src/modules/tm/tm.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9b8f927f613f1666af19347b928a099a208a8d71.diff
Patch: https://github.com/kamailio/kamailio/commit/9b8f927f613f1666af19347b928a099a208a8d71.patch

---

diff --git a/src/modules/tm/tm.c b/src/modules/tm/tm.c
index 69defa1f26..b6fcc96681 100644
--- a/src/modules/tm/tm.c
+++ b/src/modules/tm/tm.c
@@ -2930,7 +2930,7 @@ static int ki_t_relay_to_proto(sip_msg_t *msg, str *sproto)
 			proto = PROTO_UDP;
 		} else if (strncasecmp(sproto->s, "TCP", 3) == 0) {
 			proto = PROTO_TCP;
-		} else if (strncasecmp(sproto->s, "TLS", 3)) {
+		} else if (strncasecmp(sproto->s, "TLS", 3) == 0) {
 			proto = PROTO_TLS;
 		} else {
 			LM_ERR("bad protocol specified <%s>\n", sproto->s);
@@ -2955,7 +2955,7 @@ static int ki_t_relay_to_proto_addr(sip_msg_t *msg, str *sproto, str *host, int
 			proto = PROTO_UDP;
 		} else if (strncasecmp(sproto->s, "TCP", 3) == 0) {
 			proto = PROTO_TCP;
-		} else if (strncasecmp(sproto->s, "TLS", 3)) {
+		} else if (strncasecmp(sproto->s, "TLS", 3) == 0) {
 			proto = PROTO_TLS;
 		} else {
 			LM_ERR("bad protocol specified <%s>\n", sproto->s);




More information about the sr-dev mailing list