Browse code

app_perl: more debug messages to catch per execution errors

Daniel-Constantin Mierla authored on 08/07/2022 11:37:33
Showing 1 changed files
... ...
@@ -149,7 +149,7 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
149 149
 	call_pv(fnc, G_EVAL|G_SCALAR);		/* call the function     */
150 150
 
151 151
 	if(SvTRUE(ERRSV)) {
152
-		LM_WARN("perl error: %s\n", SvPV_nolen(ERRSV));
152
+		LM_WARN("perl error for [%s]: %s\n", ZSW(fnc), SvPV_nolen(ERRSV));
153 153
 	}
154 154
 
155 155
 	SPAGAIN;			/* refresh stack pointer         */
... ...
@@ -160,5 +160,6 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
160 160
 	FREETMPS;			/* free that return value        */
161 161
 	LEAVE;				/* ...and the XPUSHed "mortal" args.*/
162 162
 
163
+	LM_DBG("executed [%s] with return code: %d\n", ZSW(fnc), retval);
163 164
 	return retval;
164 165
 }