Browse code

app_perl: log the perl function name when not found

Daniel-Constantin Mierla authored on 08/07/2022 08:19:03
Showing 1 changed files
... ...
@@ -100,7 +100,7 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
100 100
 	dSP;
101 101
 
102 102
 	if (!perl_checkfnc(fnc)) {
103
-		LM_ERR("unknown perl function called.\n");
103
+		LM_ERR("unknown perl function called [%s]\n", ZSW(fnc));
104 104
 		reason.s = "Internal error";
105 105
 		reason.len = sizeof("Internal error")-1;
106 106
 		if (slb.freply(_msg, 500, &reason) == -1)
... ...
@@ -109,7 +109,7 @@ int perl_exec2(struct sip_msg* _msg, char* fnc, char* mystr) {
109 109
 		}
110 110
 		return -1;
111 111
 	}
112
-	
112
+
113 113
 	switch ((_msg->first_line).type) {
114 114
 	case SIP_REQUEST:
115 115
 		if (parse_sip_msg_uri(_msg) < 0) {