[sr-dev] git:master:a466d0b7: app_perl: more debug messages to catch per execution errors

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 8 13:38:02 CEST 2022


Module: kamailio
Branch: master
Commit: a466d0b73a66b18419555eca437136f1bcaebff9
URL: https://github.com/kamailio/kamailio/commit/a466d0b73a66b18419555eca437136f1bcaebff9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-07-08T13:37:33+02:00

app_perl: more debug messages to catch per execution errors

---

Modified: src/modules/app_perl/perlfunc.c

---

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

---

diff --git a/src/modules/app_perl/perlfunc.c b/src/modules/app_perl/perlfunc.c
index ddb442220d..cf53895fd2 100644
--- a/src/modules/app_perl/perlfunc.c
+++ b/src/modules/app_perl/perlfunc.c
@@ -149,7 +149,7 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
 	call_pv(fnc, G_EVAL|G_SCALAR);		/* call the function     */
 
 	if(SvTRUE(ERRSV)) {
-		LM_WARN("perl error: %s\n", SvPV_nolen(ERRSV));
+		LM_WARN("perl error for [%s]: %s\n", ZSW(fnc), SvPV_nolen(ERRSV));
 	}
 
 	SPAGAIN;			/* refresh stack pointer         */
@@ -160,5 +160,6 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
 	FREETMPS;			/* free that return value        */
 	LEAVE;				/* ...and the XPUSHed "mortal" args.*/
 
+	LM_DBG("executed [%s] with return code: %d\n", ZSW(fnc), retval);
 	return retval;
 }




More information about the sr-dev mailing list