Browse code

tm: fix kemi t_relay_to_proto() variants for tls

Daniel-Constantin Mierla authored on 17/05/2022 10:30:24
Showing 1 changed files
... ...
@@ -2930,7 +2930,7 @@ static int ki_t_relay_to_proto(sip_msg_t *msg, str *sproto)
2930 2930
 			proto = PROTO_UDP;
2931 2931
 		} else if (strncasecmp(sproto->s, "TCP", 3) == 0) {
2932 2932
 			proto = PROTO_TCP;
2933
-		} else if (strncasecmp(sproto->s, "TLS", 3)) {
2933
+		} else if (strncasecmp(sproto->s, "TLS", 3) == 0) {
2934 2934
 			proto = PROTO_TLS;
2935 2935
 		} else {
2936 2936
 			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
2955 2955
 			proto = PROTO_UDP;
2956 2956
 		} else if (strncasecmp(sproto->s, "TCP", 3) == 0) {
2957 2957
 			proto = PROTO_TCP;
2958
-		} else if (strncasecmp(sproto->s, "TLS", 3)) {
2958
+		} else if (strncasecmp(sproto->s, "TLS", 3) == 0) {
2959 2959
 			proto = PROTO_TLS;
2960 2960
 		} else {
2961 2961
 			LM_ERR("bad protocol specified <%s>\n", sproto->s);