Module: kamailio
Branch: master
Commit: c7fdbbf2dceee2d93902274c0c5da2766b928cbf
URL:
https://github.com/kamailio/kamailio/commit/c7fdbbf2dceee2d93902274c0c5da27…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-04-18T14:20:13+02:00
lib: wrapper function to get next faked msg
- does initialization of faked msg if not done before
---
Modified: lib/kcore/faked_msg.c
Modified: lib/kcore/faked_msg.h
---
Diff:
https://github.com/kamailio/kamailio/commit/c7fdbbf2dceee2d93902274c0c5da27…
Patch:
https://github.com/kamailio/kamailio/commit/c7fdbbf2dceee2d93902274c0c5da27…
---
diff --git a/lib/kcore/faked_msg.c b/lib/kcore/faked_msg.c
index 1132a9b..ae010e9 100644
--- a/lib/kcore/faked_msg.c
+++ b/lib/kcore/faked_msg.c
@@ -71,7 +71,7 @@ int faked_msg_init(void)
return 0;
}
-struct sip_msg* faked_msg_next(void)
+sip_msg_t* faked_msg_next(void)
{
_faked_msg.id = 1 + _faked_msg_no++;
_faked_msg.pid = my_pid();
@@ -79,3 +79,9 @@ struct sip_msg* faked_msg_next(void)
clear_branches();
return &_faked_msg;
}
+
+sip_msg_t* faked_msg_get_next(void)
+{
+ faked_msg_init();
+ return faked_msg_next();
+}
diff --git a/lib/kcore/faked_msg.h b/lib/kcore/faked_msg.h
index 31718a8..fe704ca 100644
--- a/lib/kcore/faked_msg.h
+++ b/lib/kcore/faked_msg.h
@@ -25,6 +25,7 @@
#include "../../parser/msg_parser.h"
int faked_msg_init(void);
-struct sip_msg* faked_msg_next(void);
+sip_msg_t* faked_msg_next(void);
+sip_msg_t* faked_msg_get_next(void);
#endif