Module: kamailio
Branch: master
Commit: 02b960d84d479b001cf94b2b53063deca1d7256d
URL:
https://github.com/kamailio/kamailio/commit/02b960d84d479b001cf94b2b53063de…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-26T10:15:22+02:00
core: parse - added IS_SIP_MSG() macro to check if message type is SIP
- defined also IS_SIP_REQUEST() same as IS_SIP() but with more explicit
name for detecting SIP requests
---
Modified: src/core/parser/msg_parser.h
---
Diff:
https://github.com/kamailio/kamailio/commit/02b960d84d479b001cf94b2b53063de…
Patch:
https://github.com/kamailio/kamailio/commit/02b960d84d479b001cf94b2b53063de…
---
diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h
index 8b44ce4159..595c1be895 100644
--- a/src/core/parser/msg_parser.h
+++ b/src/core/parser/msg_parser.h
@@ -147,11 +147,20 @@ if ( (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&
\
(((req)->first_line.type == SIP_REQUEST) && \
((req)->first_line.flags & FLINE_FLAG_PROTO_SIP))
+/* sip request */
+#define IS_SIP_REQUEST(req) \
+ (((req)->first_line.type == SIP_REQUEST) && \
+ ((req)->first_line.flags & FLINE_FLAG_PROTO_SIP))
+
/* sip reply */
#define IS_SIP_REPLY(rpl) \
(((rpl)->first_line.type == SIP_REPLY) && \
((rpl)->first_line.flags & FLINE_FLAG_PROTO_SIP))
+/* sip message */
+#define IS_SIP_MSG(req) \
+ ((req)->first_line.flags & FLINE_FLAG_PROTO_SIP)
+
/* http request */
#define IS_HTTP(req) \
(((req)->first_line.type == SIP_REQUEST) && \