[sr-dev] git:master:d63869cd: kazoo: init cfg framework in child processes

GitHub noreply at github.com
Sat Aug 6 13:41:18 CEST 2016


Module: kamailio
Branch: master
Commit: d63869cd31a0ac0a61f218b3144de7a9f400e0ae
URL: https://github.com/kamailio/kamailio/commit/d63869cd31a0ac0a61f218b3144de7a9f400e0ae

Author: lazedo <luis.azedo at factorlusitano.com>
Committer: GitHub <noreply at github.com>
Date: 2016-08-06T12:41:14+01:00

kazoo: init cfg framework in child processes


fixes crashing since commit c7bec3320f6907c4edd8416a5e5cfa89b071a411

---

Modified: modules/kazoo/kazoo.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d63869cd31a0ac0a61f218b3144de7a9f400e0ae.diff
Patch: https://github.com/kamailio/kamailio/commit/d63869cd31a0ac0a61f218b3144de7a9f400e0ae.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