Skip to content

Commit

Permalink
core: select - handle ws and wss inside select_ip_port()
Browse files Browse the repository at this point in the history
(cherry picked from commit d8e0942)
  • Loading branch information
miconda committed Mar 6, 2024
1 parent 4c78a56 commit 089bf63
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core/select_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 089bf63

Please sign in to comment.