Module: kamailio
Branch: master
Commit: ab72c5e7188266baef0da70f1aa7d7d28b6d077c
URL:
https://github.com/kamailio/kamailio/commit/ab72c5e7188266baef0da70f1aa7d7d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-19T15:29:05+01:00
core: function to test if a msg structure is faked request
---
Modified: src/core/fmsg.c
Modified: src/core/fmsg.h
---
Diff:
https://github.com/kamailio/kamailio/commit/ab72c5e7188266baef0da70f1aa7d7d…
Patch:
https://github.com/kamailio/kamailio/commit/ab72c5e7188266baef0da70f1aa7d7d…
---
diff --git a/src/core/fmsg.c b/src/core/fmsg.c
index 9a84954f0b..28d24cd116 100644
--- a/src/core/fmsg.c
+++ b/src/core/fmsg.c
@@ -103,3 +103,8 @@ sip_msg_t* faked_msg_get_next_clear(void)
}
return faked_msg_next_clear();
}
+
+int faked_msg_match(sip_msg_t *tmsg)
+{
+ return ( tmsg == &_faked_msg ) ? 1 : 0;
+}
diff --git a/src/core/fmsg.h b/src/core/fmsg.h
index b279100269..99eb9f61b3 100644
--- a/src/core/fmsg.h
+++ b/src/core/fmsg.h
@@ -29,5 +29,6 @@ sip_msg_t* faked_msg_next(void);
sip_msg_t* faked_msg_get_next(void);
sip_msg_t* faked_msg_next_clear(void);
sip_msg_t* faked_msg_get_next_clear(void);
+int faked_msg_match(sip_msg_t *tmsg);
#endif