From d8e0942c9e83c8cad7c182bf41c156ba35bf24d2 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Fri, 1 Mar 2024 12:46:17 +0100 Subject: [PATCH] core: select - handle ws and wss inside select_ip_port() --- src/core/select_core.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/select_core.c b/src/core/select_core.c index 12b884ead04..57dad2f78e5 100644 --- a/src/core/select_core.c +++ b/src/core/select_core.c @@ -1387,7 +1387,7 @@ int select_ip_port(str *res, select_t *s, struct sip_msg *msg) if(param & SEL_PROTO) { switch(msg->rcv.proto) { case PROTO_NONE: - proto_str.s = 0; + proto_str.s = ""; proto_str.len = 0; break; @@ -1411,6 +1411,16 @@ int select_ip_port(str *res, select_t *s, struct sip_msg *msg) proto_str.len = 4; break; + case PROTO_WS: + proto_str.s = "ws"; + proto_str.len = 2; + break; + + case PROTO_WSS: + proto_str.s = "wss"; + proto_str.len = 3; + break; + default: LM_ERR("Unknown transport protocol\n"); return -1;