[sr-dev] git:5.1:1d74f30c: app_python: init cfg vars framework only in child init

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 20 11:24:12 CEST 2018


Module: kamailio
Branch: 5.1
Commit: 1d74f30c09a79a57ed530778c3dde1fca856f14c
URL: https://github.com/kamailio/kamailio/commit/1d74f30c09a79a57ed530778c3dde1fca856f14c

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-08-20T11:23:04+02:00

app_python: init cfg vars framework only in child init

- backport of 17a33388138c2510e9e483c0526948772a1478f4

---

Modified: src/modules/app_python/app_python_mod.c

---

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

---

diff --git a/src/modules/app_python/app_python_mod.c b/src/modules/app_python/app_python_mod.c
index fc349dc184..936674309a 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -26,6 +26,7 @@
 #include "../../core/sr_module.h"
 #include "../../core/mod_fix.h"
 #include "../../core/kemi.h"
+#include "../../core/cfg/cfg_struct.h"
 
 #include "python_exec.h"
 #include "python_iface.h"
@@ -175,6 +176,9 @@ static int mod_init(void)
 static int child_init(int rank)
 {
 	_apy_process_rank = rank;
+	if (cfg_child_init()) {
+		return -1;
+	}
 	return apy_init_script(rank);
 }
 




More information about the sr-dev mailing list