[sr-dev] git:4.4:ab940349: kazoo: init cfg framework in child processes

Luis Azedo luis at 2600hz.com
Sat Aug 6 14:52:13 CEST 2016


Module: kamailio
Branch: 4.4
Commit: ab9403494300d5a07a7fe307c3666df8dbc23847
URL: https://github.com/kamailio/kamailio/commit/ab9403494300d5a07a7fe307c3666df8dbc23847

Author: lazedo <luis.azedo at factorlusitano.com>
Committer: Luis Azedo <luis at 2600hz.com>
Date: 2016-08-06T12:51:46+01:00

kazoo: init cfg framework in child processes

fixes crashing since commit c7bec3320f6907c4edd8416a5e5cfa89b071a411
(cherry picked from commit d63869cd31a0ac0a61f218b3144de7a9f400e0ae)

---

Modified: modules/kazoo/kazoo.c

---

Diff:  https://github.com/kamailio/kamailio/commit/ab9403494300d5a07a7fe307c3666df8dbc23847.diff
Patch: https://github.com/kamailio/kamailio/commit/ab9403494300d5a07a7fe307c3666df8dbc23847.patch

---

diff --git a/modules/kazoo/kazoo.c b/modules/kazoo/kazoo.c
index 28c97bd..060242d 100644
--- a/modules/kazoo/kazoo.c
+++ b/modules/kazoo/kazoo.c
@@ -393,6 +393,7 @@ static int mod_child_init(int rank)
 			if (pid<0)
 				return -1; /* error */
 			if(pid==0){
+				if (cfg_child_init()) return -1;
 				close(kz_worker_pipes_fds[i*2+1]);
 				return(kz_amqp_consumer_worker_proc(kz_worker_pipes_fds[i*2]));
 			}
@@ -406,6 +407,7 @@ static int mod_child_init(int rank)
 					if (pid<0)
 						return -1; /* error */
 					if(pid==0){
+						if (cfg_child_init()) return -1;
 						return(kz_amqp_consumer_proc(s));
 					}
 				}
@@ -416,6 +418,7 @@ static int mod_child_init(int rank)
 		if (pid<0)
 			return -1; /* error */
 		if(pid==0){
+			if (cfg_child_init()) return -1;
 			close(kz_cmd_pipe_fds[1]);
 			kz_amqp_publisher_proc(kz_cmd_pipe_fds[0]);
 		}




More information about the sr-dev mailing list