Module: kamailio Branch: master Commit: d8e0942c9e83c8cad7c182bf41c156ba35bf24d2 URL: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-03-01T12:46:17+01:00
core: select - handle ws and wss inside select_ip_port()
---
Modified: src/core/select_core.c
---
Diff: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba... Patch: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba...
---
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;