[sr-dev] git:master: receive.c: logging: convert LOG to LM_*
Ovidiu Sas
osas at voipembedded.com
Sat Oct 4 02:59:43 CEST 2014
Module: sip-router
Branch: master
Commit: 6e62abb8572118dc4fd19e602acc2a579ad629f1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6e62abb8572118dc4fd19e602acc2a579ad629f1
Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date: Fri Oct 3 20:59:35 2014 -0400
receive.c: logging: convert LOG to LM_*
---
receive.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/receive.c b/receive.c
index 83f72c0..05a23e2 100644
--- a/receive.c
+++ b/receive.c
@@ -119,7 +119,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
msg=pkg_malloc(sizeof(struct sip_msg));
if (msg==0) {
- LOG(L_ERR, "ERROR: receive_msg: no mem for sip_msg\n");
+ LM_ERR("no mem for sip_msg\n");
goto error00;
}
msg_no++;
@@ -171,7 +171,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
/* sanity checks */
if ((msg->via1==0) || (msg->via1->error!=PARSE_OK)){
/* no via, send back error ? */
- LOG(L_ERR, "ERROR: receive_msg: no via found in request\n");
+ LM_ERR("no via found in request\n");
STATS_BAD_MSG();
goto error02;
}
@@ -187,7 +187,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
){
if (tcpconn_add_alias(rcv_info->proto_reserved1, msg->via1->port,
rcv_info->proto)!=0){
- LOG(L_ERR, " ERROR: receive_msg: tcp alias failed\n");
+ LM_ERR("tcp alias failed\n");
/* continue */
}
}
@@ -214,8 +214,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
set_route_type(REQUEST_ROUTE);
/* exec the routing script */
if (run_top_route(main_rt.rlist[DEFAULT_RT], msg, 0)<0){
- LOG(L_WARN, "WARNING: receive_msg: "
- "error while trying script\n");
+ LM_WARN("error while trying script\n");
goto error_req;
}
@@ -234,7 +233,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
/* sanity checks */
if ((msg->via1==0) || (msg->via1->error!=PARSE_OK)){
/* no via, send back error ? */
- LOG(L_ERR, "ERROR: receive_msg: no via found in reply\n");
+ LM_ERR("no via found in reply\n");
STATS_BAD_RPL();
goto error02;
}
@@ -263,8 +262,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
ret=run_top_route(onreply_rt.rlist[DEFAULT_RT], msg, &ctx);
#ifndef NO_ONREPLY_ROUTE_ERROR
if (unlikely(ret<0)){
- LOG(L_WARN, "WARNING: receive_msg: "
- "error while trying onreply script\n");
+ LM_WARN("error while trying onreply script\n");
goto error_rpl;
}else
#endif /* NO_ONREPLY_ROUTE_ERROR */
More information about the sr-dev
mailing list