Module: sip-router Branch: master Commit: 30f501c092cecdcd6c90b929f14db45921767f77 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=30f501c0...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Sep 28 23:04:02 2011 +0200
mi_rpc: call init mi child based on core advertising of handling rpc commands
- update of the way to prepare sip workers to execute mi commands via rpc
---
modules/mi_rpc/mi_rpc_mod.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/modules/mi_rpc/mi_rpc_mod.c b/modules/mi_rpc/mi_rpc_mod.c index 6e6e2c6..bfc4aaf 100644 --- a/modules/mi_rpc/mi_rpc_mod.c +++ b/modules/mi_rpc/mi_rpc_mod.c @@ -78,19 +78,12 @@ struct module_exports exports = {
static int child_init(int rank) { - if(rank==PROC_RPC) { + if(is_rpc_worker(rank)) { + LM_DBG("initializing child[%d] for rpc handling\n", rank); if(init_mi_child()!=0) { LM_CRIT("Failed to init the mi commands\n"); return -1; } - } else if(rank>0) { - if(find_module_by_name("xmlrpc")!=0) - { - if(init_mi_child()!=0) { - LM_CRIT("Failed to init the mi commands for xmlrpc usage\n"); - return -1; - } - } }
return 0;