Browse code

core: parse_body.c/part_multipart_headers_cmp() changed log output from ERR to DBG in case a header does not exist

Wolfgang Kampichler authored on 07/04/2021 11:10:30
Showing 1 changed files
... ...
@@ -475,8 +475,9 @@ int part_multipart_headers_cmp (char *buffer,
475 475
 					;
476 476
 				}
477 477
 			} else {
478
+				/* Nothing matched */
478 479
 				error = -9;
479
-				error_msg = "We reached the end of the buffer";
480
+				error_msg = "Unsuccessfully reached the end of the buffer";
480 481
 			}
481 482
 			found = found_content_type * found_content_id * found_content_length;
482 483
 			if ((!found) && (!error)) {
... ...
@@ -504,7 +505,7 @@ int part_multipart_headers_cmp (char *buffer,
504 505
 	}
505 506
 
506 507
 	if (error < 0) {
507
-		if(error == -2) {
508
+		if ((error == -2) || (error == -9)) {
508 509
 			LM_DBG("result code: \"%i\" text: \"%s\".\n", error, error_msg);
509 510
 		} else {
510 511
 			LM_ERR("error code: \"%i\" error text: \"%s\".\n", error, error_msg);