Module: kamailio
Branch: master
Commit: 1ca77084e075bd78bc0603e838a268e470480a17
URL:
https://github.com/kamailio/kamailio/commit/1ca77084e075bd78bc0603e838a268e…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: lazedo <luis.azedo(a)factorlusitano.com>
Date: 2017-04-17T14:28:44+01:00
kazoo: call cfg_update on child init
---
Modified: src/modules/kazoo/kazoo.c
Modified: src/modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1ca77084e075bd78bc0603e838a268e…
Patch:
https://github.com/kamailio/kamailio/commit/1ca77084e075bd78bc0603e838a268e…
---
diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c
index 8574de6..d3078fe 100644
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -370,6 +370,7 @@ static int mod_child_init(int rank)
if(pid==0){
if (cfg_child_init()) return -1;
close(kz_worker_pipes_fds[i*2+1]);
+ cfg_update();
return(kz_amqp_consumer_worker_proc(kz_worker_pipes_fds[i*2]));
}
}
@@ -383,6 +384,7 @@ static int mod_child_init(int rank)
return -1; /* error */
if(pid==0){
if (cfg_child_init()) return -1;
+ cfg_update();
return(kz_amqp_consumer_proc(s));
}
}
@@ -395,6 +397,7 @@ static int mod_child_init(int rank)
if(pid==0){
if (cfg_child_init()) return -1;
close(kz_cmd_pipe_fds[1]);
+ cfg_update();
kz_amqp_publisher_proc(kz_cmd_pipe_fds[0]);
}
return 0;
diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c
index 6657443..4664c25 100644
--- a/src/modules/kazoo/kz_amqp.c
+++ b/src/modules/kazoo/kz_amqp.c
@@ -2256,7 +2256,7 @@ int kz_pv_get_event_payload(struct sip_msg *msg, pv_param_t
*param, pv_value_t *
int kz_amqp_consumer_fire_event(char *eventkey)
{
- struct sip_msg *fmsg;
+ sip_msg_t *fmsg;
struct run_act_ctx ctx;
int rtb, rt;
@@ -2268,9 +2268,7 @@ int kz_amqp_consumer_fire_event(char *eventkey)
return -2;
}
LM_DBG("executing event_route[%s] (%d)\n", eventkey, rt);
- if(faked_msg_init()<0)
- return -2;
- fmsg = faked_msg_next();
+ fmsg = faked_msg_get_next();
rtb = get_route_type();
set_route_type(REQUEST_ROUTE);
init_run_actions_ctx(&ctx);