Skip to content

Commit

Permalink
core: added more flexible processing for nonsip_hook messages
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Aug 1, 2016
1 parent 1f7f96d commit 6291db5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parser/parse_fline.c
Expand Up @@ -254,7 +254,7 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start* fl)
};
error1:
fl->type=SIP_INVALID;
LOG(L_ERR, "parse_first_line: bad message (offset: %d)\n", offset);
LOG(cfg_get(core, core_cfg, corelog), "parse_first_line: bad message (offset: %d)\n", offset);
/* skip line */
nl=eat_line(buffer,len);
return nl;
Expand Down
6 changes: 3 additions & 3 deletions receive.c
Expand Up @@ -172,14 +172,14 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
if(likely(sr_msg_time==1)) msg_set_time(msg);

if (parse_msg(buf,len, msg)!=0){
if(sr_event_exec(SREV_RCV_NOSIP, (void*)msg)!=0) {
if((ret=sr_event_exec(SREV_RCV_NOSIP, (void*)msg))<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);
}
goto error02;
}
else if(ret == NONSIP_MSG_DROP) goto error02;
}
LM_DBG("After parse_msg...\n");

Expand Down

0 comments on commit 6291db5

Please sign in to comment.