Browse code

core: receive - use sip_parser_log for a few logs related to parsing errors

Daniel-Constantin Mierla authored on 15/10/2020 09:02:59
Showing 1 changed files
... ...
@@ -314,7 +314,8 @@ int receive_msg(char *buf, unsigned int len, receive_info_t *rcv_info)
314 314
 
315 315
 	if(unlikely(parse_headers(msg, HDR_FROM_F | HDR_TO_F | HDR_CALLID_F | HDR_CSEQ_F, 0)
316 316
 			< 0)) {
317
-		LM_WARN("parsing relevant headers failed\n");
317
+		LOG(cfg_get(core, core_cfg, sip_parser_log),
318
+				"parsing relevant headers failed\n");
318 319
 	}
319 320
 	LM_DBG("--- received sip message - %s - call-id: [%.*s] - cseq: [%.*s]\n",
320 321
 			(msg->first_line.type == SIP_REQUEST) ? "request" : "reply",
... ...
@@ -353,7 +354,8 @@ int receive_msg(char *buf, unsigned int len, receive_info_t *rcv_info)
353 354
 		/* sanity checks */
354 355
 		if(unlikely((msg->via1 == 0) || (msg->via1->error != PARSE_OK))) {
355 356
 			/* no via, send back error ? */
356
-			LM_ERR("no via found in request\n");
357
+			LOG(cfg_get(core, core_cfg, sip_parser_log),
358
+					"no via found in request\n");
357 359
 			STATS_BAD_MSG();
358 360
 			goto error02;
359 361
 		}