[sr-dev] git:master:17a33388: app_python: init cfg vars framework only in child init

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[sr-dev] git:master:17a33388: app_python: init cfg vars framework only in child init

Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 17a33388138c2510e9e483c0526948772a1478f4
URL: https://github.com/kamailio/kamailio/commit/17a33388138c2510e9e483c0526948772a1478f4

Author: Daniel-Constantin Mierla <[hidden email]>
Committer: Daniel-Constantin Mierla <[hidden email]>
Date: 2018-08-20T11:11:45+02:00

app_python: init cfg vars framework only in child init

- apy init is executed in other parts as well

---

Modified: src/modules/app_python/app_python_mod.c

---

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

---

diff --git a/src/modules/app_python/app_python_mod.c b/src/modules/app_python/app_python_mod.c
index 8ed21e1c93..6535cd93b3 100644
--- a/src/modules/app_python/app_python_mod.c
+++ b/src/modules/app_python/app_python_mod.c
@@ -180,6 +180,9 @@ static int child_init(int rank)
  }
  _apy_process_rank = rank;
  PyOS_AfterFork();
+ if (cfg_child_init()) {
+ return -1;
+ }
  return apy_init_script(rank);
 }
 
@@ -436,10 +439,6 @@ int apy_init_script(int rank)
  goto err;
  }
 
- if (cfg_child_init()) {
- goto err;
- }
-
  pArgs = PyTuple_New(1);
  if (pArgs == NULL) {
  python_handle_exception("child_init");


_______________________________________________
Kamailio (SER) - Development Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev