Module: kamailio
Branch: 4.4
Commit: f5017b0e352a23b000f6927875fcb8758b31ffff
URL:
https://github.com/kamailio/kamailio/commit/f5017b0e352a23b000f6927875fcb87…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-09-14T13:54:54+02:00
jsonrpc-c: set the cpm pipe for all child processes
- reported by Ian Yu-Hsun Lin, GH #713
(cherry picked from commit 3b31c51bd66737891b549895dea068494929926c)
---
Modified: modules/jsonrpc-c/jsonrpc_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f5017b0e352a23b000f6927875fcb87…
Patch:
https://github.com/kamailio/kamailio/commit/f5017b0e352a23b000f6927875fcb87…
---
diff --git a/modules/jsonrpc-c/jsonrpc_mod.c b/modules/jsonrpc-c/jsonrpc_mod.c
index f462a14..39d8819 100644
--- a/modules/jsonrpc-c/jsonrpc_mod.c
+++ b/modules/jsonrpc-c/jsonrpc_mod.c
@@ -115,15 +115,15 @@ static int mod_init(void) {
LM_ERR("pipe() failed\n");
return -1;
}
-
+
return(0);
}
-static int child_init(int rank)
+static int child_init(int rank)
{
int pid;
-
- if (rank>PROC_MAIN)
+
+ if (rank!=PROC_INIT)
cmd_pipe = pipe_fds[1];
if (rank!=PROC_MAIN)