Module: kamailio
Branch: 5.5
Commit: 7b89c5e6abe5f4ae3ee55d9c938c865806f29dec
URL:
https://github.com/kamailio/kamailio/commit/7b89c5e6abe5f4ae3ee55d9c938c865…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-10T12:29:07+02:00
pv: added missing WS and WSS to $K(key) variable
(cherry picked from commit a8c9d0ae4fbafba89ef12737419037d141eed1d3)
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7b89c5e6abe5f4ae3ee55d9c938c865…
Patch:
https://github.com/kamailio/kamailio/commit/7b89c5e6abe5f4ae3ee55d9c938c865…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 6ead708037..dd3d22e95a 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -3329,6 +3329,10 @@ int pv_parse_K_name(pv_spec_p sp, str *in)
switch(in->len)
{
+ case 2:
+ if(strncmp(in->s, "WS", 2)==0)
+ sp->pvp.pvn.u.isname.name.n = 6;
+ else goto error;
case 3:
if(strncmp(in->s, "UDP", 3)==0)
sp->pvp.pvn.u.isname.name.n = 2;
@@ -3336,6 +3340,8 @@ int pv_parse_K_name(pv_spec_p sp, str *in)
sp->pvp.pvn.u.isname.name.n = 3;
else if(strncmp(in->s, "TLS", 3)==0)
sp->pvp.pvn.u.isname.name.n = 4;
+ else if(strncmp(in->s, "WSS", 3)==0)
+ sp->pvp.pvn.u.isname.name.n = 7;
else goto error;
break;
case 4:
@@ -3407,6 +3413,10 @@ int pv_get_K(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
return pv_get_uintval(msg, param, res, PROTO_TLS);
case 5:
return pv_get_uintval(msg, param, res, PROTO_SCTP);
+ case 6:
+ return pv_get_uintval(msg, param, res, PROTO_WS);
+ case 7:
+ return pv_get_uintval(msg, param, res, PROTO_WSS);
default:
return pv_get_uintval(msg, param, res, AF_INET);
}