Module: kamailio
Branch: master
Commit: 4af9116951d0be9c3d042eabd632971b13df8ad1
URL:
https://github.com/kamailio/kamailio/commit/4af9116951d0be9c3d042eabd632971…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-06T16:22:44+02:00
core: structure to pass cfg env attributes between components
---
Modified: main.c
Modified: srapi.c
Modified: srapi.h
---
Diff:
https://github.com/kamailio/kamailio/commit/4af9116951d0be9c3d042eabd632971…
Patch:
https://github.com/kamailio/kamailio/commit/4af9116951d0be9c3d042eabd632971…
---
diff --git a/main.c b/main.c
index fc69b56..5809e12 100644
--- a/main.c
+++ b/main.c
@@ -19,7 +19,7 @@
*
*/
-/** Kamailio core :: main file (init, daemonize, startup)
+/** Kamailio core :: main file (init, daemonize, startup)
* @file main.c
* @ingroup core
* Module: core
@@ -133,6 +133,7 @@
#include "async_task.h"
#include "dset.h"
#include "timer_proc.h"
+#include "srapi.h"
#ifdef DEBUG_DMALLOC
#include <dmalloc.h>
@@ -1836,6 +1837,7 @@ int main(int argc, char** argv)
debug_flag=0;
dont_fork_cnt=0;
+ sr_cfgenv_init();
daemon_status_init();
dprint_init_colors();
diff --git a/srapi.c b/srapi.c
index a84762e..e01659b 100644
--- a/srapi.c
+++ b/srapi.c
@@ -44,3 +44,24 @@ sr_generate_callid_f sr_get_callid_func(void)
{
return _sr_generate_callid_func;
}
+
+/**
+ *
+ */
+static sr_cfgenv_t _sr_cfgenv;
+
+/**
+ *
+ */
+void sr_cfgenv_init(void)
+{
+ memset(&_sr_cfgenv, 0, sizeof(sr_cfgenv_t));
+}
+
+/**
+ *
+ */
+sr_cfgenv_t* sr_cfgenv_get(void)
+{
+ return &_sr_cfgenv;
+}
diff --git a/srapi.h b/srapi.h
index e0f7867..d45fe35 100644
--- a/srapi.h
+++ b/srapi.h
@@ -27,4 +27,11 @@ int sr_register_callid_func(sr_generate_callid_f f);
sr_generate_callid_f sr_get_callid_func(void);
+typedef struct sr_cfgenv {
+ int cseq_update;
+} sr_cfgenv_t;
+
+void sr_cfgenv_init(void);
+sr_cfgenv_t* sr_cfgenv_get(void);
+
#endif