Module: kamailio
Branch: master
Commit: d90d15ddaf937222e8634a18b61de779c87a3c90
URL:
https://github.com/kamailio/kamailio/commit/d90d15ddaf937222e8634a18b61de77…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-07-07T08:55:21+02:00
app_perl: continue on perl_parse() non-0 return code
- it is application return code on some perl versions
---
Modified: src/modules/app_perl/app_perl_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d90d15ddaf937222e8634a18b61de77…
Patch:
https://github.com/kamailio/kamailio/commit/d90d15ddaf937222e8634a18b61de77…
---
diff --git a/src/modules/app_perl/app_perl_mod.c b/src/modules/app_perl/app_perl_mod.c
index 854268f398..ec373c7bf6 100644
--- a/src/modules/app_perl/app_perl_mod.c
+++ b/src/modules/app_perl/app_perl_mod.c
@@ -235,16 +235,12 @@ PerlInterpreter *parser_init(void) {
argc++;
pr=perl_parse(new_perl, xs_init, argc, argv, NULL);
+
if (pr) {
- LM_ERR("failed to load perl file \"%s\" with code %d.\n",
argv[argc-1], pr);
- if (modpathset_start) {
- for (i = modpathset_start; i <= modpathset_end; i++) {
- pkg_free(argv[i]);
- }
- }
- return NULL;
+ LM_WARN("parsed perl file \"%s\" returned with code %d -
continue\n",
+ argv[argc-1], pr);
} else {
- LM_INFO("successfully loaded perl file \"%s\"\n", argv[argc-1]);
+ LM_INFO("successfully parsed perl file \"%s\"\n", argv[argc-1]);
}
if (modpathset_start) {
@@ -252,7 +248,8 @@ PerlInterpreter *parser_init(void) {
pkg_free(argv[i]);
}
}
- perl_run(new_perl);
+ pr = perl_run(new_perl);
+ LM_INFO("perl run return code %d\n", pr);
return new_perl;