Module: sip-router
Branch: 3.1
Commit: f1bd0d840ec4a8521d8ad97bc8fe424913b71a7e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f1bd0d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Apr 7 19:29:36 2011 +0200
mi_xmlrpc: update cfg framework structures in extra MI processes
(cherry picked from commit b1429aef87e64833e0fa3c8f3356ce2ac69a4dee)
---
modules_k/mi_xmlrpc/mi_xmlrpc.c | 9 +++++++++
modules_k/mi_xmlrpc/xr_server.c | 4 ++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/modules_k/mi_xmlrpc/mi_xmlrpc.c b/modules_k/mi_xmlrpc/mi_xmlrpc.c
index 6d9bf51..9be1650 100644
--- a/modules_k/mi_xmlrpc/mi_xmlrpc.c
+++ b/modules_k/mi_xmlrpc/mi_xmlrpc.c
@@ -65,6 +65,7 @@
#include "../../pt.h"
#include "../../mem/mem.h"
#include "../../mem/shm_mem.h"
+#include "../../cfg/cfg_struct.h"
xmlrpc_env env;
xmlrpc_value * xr_response;
@@ -134,6 +135,9 @@ static int mod_init(void)
/* add space for extra processes */
register_procs(1);
+ /* add child to update local config framework structures */
+ cfg_register_child(1);
+
return 0;
}
@@ -146,6 +150,11 @@ static int child_init(int rank)
return -1; /* error */
if(pid==0){
/* child */
+
+ /* initialize the config framework */
+ if (cfg_child_init())
+ return -1;
+
xmlrpc_process(1);
}
}
diff --git a/modules_k/mi_xmlrpc/xr_server.c b/modules_k/mi_xmlrpc/xr_server.c
index 18d5e0f..8d3f8bc 100644
--- a/modules_k/mi_xmlrpc/xr_server.c
+++ b/modules_k/mi_xmlrpc/xr_server.c
@@ -35,6 +35,7 @@
#include "../../mem/shm_mem.h"
#include "../../locking.h"
#include "../../ut.h"
+#include "../../cfg/cfg_struct.h"
#include "xr_writer.h"
#include "xr_parser.h"
#include "mi_xmlrpc.h"
@@ -177,6 +178,9 @@ xmlrpc_value* default_method (xmlrpc_env* env,
LM_DBG("starting up.....\n");
+ /* update the local config framework structures */
+ cfg_update();
+
f = lookup_mi_cmd((char*)methodName, strlen(methodName));
if ( f == 0 ) {