[sr-dev] git:master:22b405e1: app_perl: check returned my_perl value on reload
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jul 7 08:24:37 CEST 2022
Module: kamailio
Branch: master
Commit: 22b405e12631a33d02823bf2816538b5f2102259
URL: https://github.com/kamailio/kamailio/commit/22b405e12631a33d02823bf2816538b5f2102259
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/22b405e12631a33d02823bf2816538b5f2102259.diff
Patch: https://github.com/kamailio/kamailio/commit/22b405e12631a33d02823bf2816538b5f2102259.patch
---
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;
}
More information about the sr-dev
mailing list