Module: kamailio
Branch: master
Commit: ffbb6ad2837326e7309be342ce62527c16f6db16
URL:
https://github.com/kamailio/kamailio/commit/ffbb6ad2837326e7309be342ce62527…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-03-22T19:40:22+01:00
nats: register cfg child procs and trigger init
- GH #3395
---
Modified: src/modules/nats/nats_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ffbb6ad2837326e7309be342ce62527…
Patch:
https://github.com/kamailio/kamailio/commit/ffbb6ad2837326e7309be342ce62527…
---
diff --git a/src/modules/nats/nats_mod.c b/src/modules/nats/nats_mod.c
index 5cf635e0fac..053ad8c8ba2 100644
--- a/src/modules/nats/nats_mod.c
+++ b/src/modules/nats/nats_mod.c
@@ -182,6 +182,7 @@ static int mod_init(void)
return -1;
}
register_procs(total_procs);
+ cfg_register_child(total_procs);
nats_pub_worker_pipes_fds =
(int *)shm_malloc(sizeof(int) * (nats_pub_workers_num)*2);
@@ -369,6 +370,8 @@ static int mod_child_init(int rank)
LM_ERR("failed to fork worker process %d\n", i);
return -1;
} else if(newpid == 0) {
+ if(cfg_child_init())
+ return -1;
worker_loop(i);
} else {
nats_workers[i].pid = newpid;