[sr-dev] git:5.1:53bc3a93: core: backported commit f088d2afe4153b9e440a4293211c78f5a25af691 manually

Juha Heinanen jh at tutpro.com
Mon Sep 17 17:18:28 CEST 2018


Module: kamailio
Branch: 5.1
Commit: 53bc3a936d43d0eb23c61b0d1f089c63b437b0e9
URL: https://github.com/kamailio/kamailio/commit/53bc3a936d43d0eb23c61b0d1f089c63b437b0e9

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date: 2018-09-17T18:17:36+03:00

core: backported commit f088d2afe4153b9e440a4293211c78f5a25af691 manually

---

Modified: src/core/receive.c

---

Diff:  https://github.com/kamailio/kamailio/commit/53bc3a936d43d0eb23c61b0d1f089c63b437b0e9.diff
Patch: https://github.com/kamailio/kamailio/commit/53bc3a936d43d0eb23c61b0d1f089c63b437b0e9.patch

---

diff --git a/src/core/receive.c b/src/core/receive.c
index cd92ef8cad..fe7bb6eed9 100644
--- a/src/core/receive.c
+++ b/src/core/receive.c
@@ -137,6 +137,7 @@ int receive_msg(char *buf, unsigned int len, struct receive_info *rcv_info)
 	sr_net_info_t netinfo;
 	sr_kemi_eng_t *keng = NULL;
 	sr_event_param_t evp = {0};
+	int errsipmsg = 0;
 
 	if(sr_event_enabled(SREV_NET_DATA_RECV)) {
 		if(sip_check_fline(buf, len) == 0) {
@@ -182,15 +183,22 @@ int receive_msg(char *buf, unsigned int len, struct receive_info *rcv_info)
 		msg_set_time(msg);
 
 	if(parse_msg(buf, len, msg) != 0) {
+		errsipmsg = 1;
 		evp.data = (void *)msg;
 		if((ret = sr_event_exec(SREV_RCV_NOSIP, &evp)) < NONSIP_MSG_DROP) {
-			LOG(cfg_get(core, core_cfg, corelog),
-					"core parsing of SIP message failed (%s:%d/%d)\n",
-					ip_addr2a(&msg->rcv.src_ip), (int)msg->rcv.src_port,
-					(int)msg->rcv.proto);
-			sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR);
-		} else if(ret == NONSIP_MSG_DROP)
+			LM_DBG("attempt of nonsip message processing failed\n");
+		} else if(ret == NONSIP_MSG_DROP) {
+			LM_DBG("nonsip message processing completed\n");
 			goto error02;
+		}
+	}
+	if(errsipmsg==1) {
+		LOG(cfg_get(core, core_cfg, corelog),
+				"core parsing of SIP message failed (%s:%d/%d)\n",
+				ip_addr2a(&msg->rcv.src_ip), (int)msg->rcv.src_port,
+				(int)msg->rcv.proto);
+		sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR);
+		goto error02;
 	}
 
 	if(parse_headers(msg, HDR_FROM_F | HDR_TO_F | HDR_CALLID_F | HDR_CSEQ_F, 0)




More information about the sr-dev mailing list