Browse code

core: execute callback functions for event SREV_RCV_NOSIP

- it is done only if parsing sip message fails
- reminder that the log level for core parsing error can be controlled
with corelog global parameter

Daniel-Constantin Mierla authored on 18/07/2014 14:03:40
Showing 1 changed files
... ...
@@ -142,11 +142,13 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
142 142
 	if(likely(sr_msg_time==1)) msg_set_time(msg);
143 143
 
144 144
 	if (parse_msg(buf,len, msg)!=0){
145
-		LOG(cfg_get(core, core_cfg, corelog),
145
+		if(sr_event_exec(SREV_RCV_NOSIP, (void*)msg)!=0) {
146
+			LOG(cfg_get(core, core_cfg, corelog),
146 147
 				"core parsing of SIP message failed (%s:%d/%d)\n",
147 148
 				ip_addr2a(&msg->rcv.src_ip), (int)msg->rcv.src_port,
148 149
 				(int)msg->rcv.proto);
149
-		sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR);
150
+			sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR);
151
+		}
150 152
 		goto error02;
151 153
 	}
152 154
 	DBG("After parse_msg...\n");