Module: sip-router
Branch: 4.1
Commit: a8b3660d0048fe81f2d8961c967fb839558c465a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a8b3660…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Apr 16 12:14:44 2014 +0200
app_perl: print return code if perl_parse() failes
(cherry picked from commit 6c5ebff42c1ee702ab4a859ffdd5ffeccbf8e11d)
---
modules/app_perl/app_perl_mod.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/app_perl/app_perl_mod.c b/modules/app_perl/app_perl_mod.c
index 3948bbe..625fec3 100644
--- a/modules/app_perl/app_perl_mod.c
+++ b/modules/app_perl/app_perl_mod.c
@@ -209,6 +209,7 @@ PerlInterpreter *parser_init(void) {
int modpathset_start = 0;
int modpathset_end = 0;
int i;
+ int pr;
new_perl = perl_alloc();
@@ -249,8 +250,9 @@ PerlInterpreter *parser_init(void) {
argv[argc] = filename; /* The script itself */
argc++;
- if (perl_parse(new_perl, xs_init, argc, argv, NULL)) {
- LM_ERR("failed to load perl file \"%s\".\n", argv[argc-1]);
+ 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]);