Module: kamailio
Branch: master
Commit: 5d03c9235f79ce4af35b6f79eddebae9f512f1d3
URL:
https://github.com/kamailio/kamailio/commit/5d03c9235f79ce4af35b6f79eddebae…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-09T14:48:19+02:00
core: kemi - added KSR.is_WSX() - return true of proto is WS or WSS
---
Modified: src/core/kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5d03c9235f79ce4af35b6f79eddebae…
Patch:
https://github.com/kamailio/kamailio/commit/5d03c9235f79ce4af35b6f79eddebae…
---
diff --git a/src/core/kemi.c b/src/core/kemi.c
index bee8a98f07..065eba9c2c 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -1155,6 +1155,18 @@ static int sr_kemi_core_is_proto_wss(sip_msg_t *msg)
return (msg->rcv.proto == PROTO_WSS)?SR_KEMI_TRUE:SR_KEMI_FALSE;
}
+/**
+ *
+ */
+static int sr_kemi_core_is_proto_wsx(sip_msg_t *msg)
+{
+ if (msg->rcv.proto == PROTO_WSS) return SR_KEMI_TRUE;
+ if (msg->rcv.proto == PROTO_WS) return SR_KEMI_TRUE;
+
+ return SR_KEMI_FALSE;
+}
+
+
/**
*
*/
@@ -1888,6 +1900,11 @@ static sr_kemi_t _sr_kemi_core[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init(""), str_init("is_WSX"),
+ SR_KEMIP_BOOL, sr_kemi_core_is_proto_wsx,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init(""), str_init("is_SCTP"),
SR_KEMIP_BOOL, sr_kemi_core_is_proto_sctp,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,