Module: kamailio Branch: master Commit: 22b405e12631a33d02823bf2816538b5f2102259 URL: https://github.com/kamailio/kamailio/commit/22b405e12631a33d02823bf2816538b5...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2022-07-07T08:12:33+02:00
app_perl: check returned my_perl value on reload
- related to GH #3134
---
Modified: src/modules/app_perl/app_perl_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/22b405e12631a33d02823bf2816538b5... Patch: https://github.com/kamailio/kamailio/commit/22b405e12631a33d02823bf2816538b5...
---
diff --git a/src/modules/app_perl/app_perl_mod.c b/src/modules/app_perl/app_perl_mod.c index 31b001c9b94..854268f398a 100644 --- a/src/modules/app_perl/app_perl_mod.c +++ b/src/modules/app_perl/app_perl_mod.c @@ -283,6 +283,13 @@ int perl_reload(void) } my_perl = parser_init();
+ if(my_perl) { + LM_DBG("new perl interpreter initialized\n"); + } else { + LM_CRIT("failed to initialize a new perl interpreter - exiting\n"); + exit(-1); + } + #ifdef PERL_EXIT_DESTRUCT_END PL_exit_flags |= PERL_EXIT_DESTRUCT_END; #else @@ -291,13 +298,7 @@ int perl_reload(void) PL_exit_flags |= PERL_EXIT_EXPECTED; #endif
- if(my_perl) { - LM_DBG("new perl interpreter initialized\n"); - return 0; - } else { - LM_CRIT("failed to initialize a new perl interpreter - exiting\n"); - exit(-1); - } + return 0; }