Browse code

core: parser - print ascii code and position of invalid char for identity info

(cherry picked from commit 40e59d9c3b8ec531cb9e26093c43647a43108dfd)

Daniel-Constantin Mierla authored on 12/01/2022 13:12:42
Showing 1 changed files
... ...
@@ -311,8 +311,8 @@ void parse_identityinfo(char *buffer, char *end, struct identityinfo_body *ii_b)
311 311
 
312 312
 parseerror:
313 313
 	if(p < end) {
314
-		LM_ERR("unexpected char [%c] in status %d: [%.*s]\n", *p, status,
315
-				(int)(p - buffer), buffer);
314
+		LM_ERR("unexpected char [%c/%d] in status %d - pos %d: [%.*s]\n", *p, *p,
315
+				status, (int)(p - buffer), (int)(p - buffer), buffer);
316 316
 	} else {
317 317
 		LM_ERR("unexpected end of buffer - status %d\n", status);
318 318
 	}