kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
October 2014
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
34 participants
381 discussions
Start a n
N
ew thread
git:master: select_buf.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 500f06d314a6c2ba05fb2af5a1bdcfd7eda4df1d URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=500f06d…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 21:26:28 2014 -0400 select_buf.c: logging: convert LOG to LM_* --- select_buf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/select_buf.c b/select_buf.c index aef1c78..
…
[View More]
87fc73b 100644 --- a/select_buf.c +++ b/select_buf.c @@ -115,7 +115,7 @@ char* get_static_buffer(int req_size) { #ifdef EXTRA_DEBUG if ((active_buffer < 0) || (active_buffer > MAX_BUFFERS-1)) { - LOG(L_CRIT, "BUG: buffers have not been initialized yet. " + LM_CRIT("buffers have not been initialized yet. " "Call reset_static_buffer() before executing " "a route block.\n"); abort();
[View Less]
10 years, 3 months
1
0
0
0
git:master: select.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: cdc727b2871a4392ca769b35a9004ff995016e72 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cdc727b…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 21:25:37 2014 -0400 select.c: logging: convert LOG to LM_* --- select.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/select.c b/select.c index 455baa6..3b605d5 100644 ---
…
[View More]
a/select.c +++ b/select.c @@ -313,10 +313,10 @@ int resolve_select(select_t* s) } switch (s->params[param_idx].type) { case SEL_PARAM_STR: - LOG(L_ERR, "Unable to resolve select '%.*s' at level %d\n", s->params[param_idx].v.s.len, s->params[param_idx].v.s.s, param_idx); + LM_ERR("Unable to resolve select '%.*s' at level %d\n", s->params[param_idx].v.s.len, s->params[param_idx].v.s.s, param_idx); break; case SEL_PARAM_INT: - LOG(L_ERR, "Unable to resolve select [%d] at level %d\n", s->params[param_idx].v.i, param_idx); + LM_ERR("Unable to resolve select [%d] at level %d\n", s->params[param_idx].v.i, param_idx); break; default: BUG ("Unable to resolve select at level %d\n", param_idx);
[View Less]
10 years, 3 months
1
0
0
0
git:master: route.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 931c45dd129676bd668f0c15fd71e0d22799cbdb URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=931c45d…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 21:24:54 2014 -0400 route.c: logging: convert LOG to LM_* --- route.c | 189 ++++++++++++++++++++++++++------------------------------------- 1 files changed, 77 insertions(+), 112 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=931…
10 years, 3 months
1
0
0
0
git:master: resolve.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 8e1c2b1a550969f6c4d15964d10d498179f4fab6 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8e1c2b1…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 21:08:14 2014 -0400 resolve.c: logging: convert LOG to LM_* --- resolve.c | 87 ++++++++++++++++++++++++++++--------------------------------- 1 files changed, 40 insertions(+), 47 deletions(-) Diff:
…
[View More]
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=8e1…
[View Less]
10 years, 3 months
1
0
0
0
git:master: receive.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 6e62abb8572118dc4fd19e602acc2a579ad629f1 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6e62abb…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)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..
…
[View More]
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 */
[View Less]
10 years, 3 months
1
0
0
0
git:master: re.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: af8bbc2e13ed2831a88acf65fd7cf7e2b18eec78 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=af8bbc2…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 20:56:28 2014 -0400 re.c: logging: convert LOG to LM_* --- re.c | 48 +++++++++++++++++++++--------------------------- 1 files changed, 21 insertions(+), 27 deletions(-) diff --git a/re.c b/re.c
…
[View More]
index 9c4c4b3..e1fe37d 100644 --- a/re.c +++ b/re.c @@ -231,16 +231,14 @@ struct subst_expr* subst_parser(str* subst) cflags=REG_EXTENDED | REG_NEWLINE; /* don't match newline */ replace_all=0; if (subst->len<3){ - LOG(L_ERR, "ERROR: subst_parser: expression is too short: %.*s\n", - subst->len, subst->s); + LM_ERR("expression is too short: %.*s\n", subst->len, subst->s); goto error; } p=subst->s; c=*p; if (c=='\\'){ - LOG(L_ERR, "ERROR: subst_parser: invalid separator char <%c>" - " in %.*s\n", c, subst->len, subst->s); + LM_ERR("invalid separator char <%c> in %.*s\n", c, subst->len, subst->s); goto error; } p++; @@ -251,13 +249,12 @@ struct subst_expr* subst_parser(str* subst) /* if unescaped sep. char */ if ((*p==c) && (*(p-1)!='\\')) goto found_re; } - LOG(L_ERR, "ERROR: subst_parser: no separator found: %.*s\n", subst->len, - subst->s); + LM_ERR("no separator found: %.*s\n", subst->len, subst->s); goto error; found_re: re_end=p; if (end < (p + 2)) { - ERR("subst_parser: String too short\n"); + LM_ERR("String too short\n"); goto error; } repl=p+1; @@ -279,15 +276,14 @@ found_re: replace_all=1; break; default: - LOG(L_ERR, "ERROR: subst_parser: unknown flag %c in %.*s\n", - *p, subst->len, subst->s); + LM_ERR("unknown flag %c in %.*s\n", *p, subst->len, subst->s); goto error; } } /* compile the re */ if ((regex=pkg_malloc(sizeof(regex_t)))==0){ - LOG(L_ERR, "ERROR: subst_parser: out of memory (re)\n"); + LM_ERR("out of memory\n"); goto error; } c=*re_end; /* regcomp expects null terminated strings -- save */ @@ -296,8 +292,8 @@ found_re: pkg_free(regex); regex=0; *re_end=c; /* restore */ - LOG(L_ERR, "ERROR: subst_parser: bad regular expression %.*s in " - "%.*s\n", (int)(re_end-re), re, subst->len, subst->s); + LM_ERR("bad regular expression %.*s in %.*s\n", + (int)(re_end-re), re, subst->len, subst->s); goto error; } *re_end=c; /* restore */ @@ -306,7 +302,7 @@ found_re: ((rw_no)?(rw_no-1)*sizeof(struct replace_with):0)); /* 1 replace_with structure is already included in subst_expr */ if (se==0){ - LOG(L_ERR, "ERROR: subst_parser: out of memory (subst_expr)\n"); + LM_ERR("out of memory\n"); goto error; } memset((void*)se, 0, sizeof(struct subst_expr)); @@ -314,7 +310,7 @@ found_re: se->replacement.len=repl_end-repl; if (se->replacement.len > 0) { if ((se->replacement.s=pkg_malloc(se->replacement.len))==0){ - LOG(L_ERR, "ERROR: subst_parser: out of memory (replacement)\n"); + LM_ERR("out of memory\n"); goto error; } /* start copying */ @@ -351,7 +347,7 @@ static int replace_build(const char* match, int nmatch, regmatch_t* pmatch, #define RBUF_APPEND(dst, src, size) \ if ((dst) - rbuf + (size) >= REPLACE_BUFFER_SIZE - 1) { \ - ERR("replace_build: Buffer too small\n"); \ + LM_ERR("Buffer too small\n"); \ goto error; \ } \ memcpy((dst), (src), (size)); \ @@ -383,8 +379,7 @@ static int replace_build(const char* match, int nmatch, regmatch_t* pmatch, break; case REPLACE_URI: if (msg->first_line.type!=SIP_REQUEST){ - LOG(L_CRIT, "BUG: replace_build: uri substitution on" - " a reply\n"); + LM_CRIT("uri substitution on a reply\n"); break; /* ignore, we can continue */ } uri= (msg->new_uri.s)?(&msg->new_uri): @@ -393,21 +388,20 @@ static int replace_build(const char* match, int nmatch, regmatch_t* pmatch, break; case REPLACE_SPEC: if(pv_get_spec_value(msg, &se->replace[r].u.spec, &sv)!=0) { - ERR("replace_build: item substitution returned error\n"); + LM_ERR("item substitution returned error\n"); break; /* ignore, we can continue */ } RBUF_APPEND(dest, sv.rs.s, sv.rs.len); break; default: - LOG(L_CRIT, "BUG: replace_build: unknown type %d\n", - se->replace[r].type); + LM_CRIT("unknown type %d\n", se->replace[r].type); /* ignore it */ } } RBUF_APPEND(dest, p, end-p); rpl->len = dest - rbuf; if ((rpl->s = pkg_malloc(rpl->len)) == NULL) { - ERR("replace_build: Out of pkg memory\n"); + LM_ERR("Out of pkg memory\n"); goto error; } memcpy(rpl->s, rbuf, rpl->len); @@ -445,7 +439,7 @@ struct replace_lst* subst_run(struct subst_expr* se, const char* input, /* no of () referenced + 1 for the whole string: pmatch[0] */ pmatch=pkg_malloc(nmatch*sizeof(regmatch_t)); if (pmatch==0){ - LOG(L_ERR, "ERROR: subst_run_ out of mem. (pmatch)\n"); + LM_ERR("out of mem\n"); goto error; } eflags=0; @@ -455,16 +449,16 @@ struct replace_lst* subst_run(struct subst_expr* se, const char* input, /* subst */ if (r==0){ /* != REG_NOMATCH */ if (pmatch[0].rm_so==-1) { - ERR("subst_run: Unknown offset?\n"); + LM_ERR("Unknown offset?\n"); goto error; } if (pmatch[0].rm_so==pmatch[0].rm_eo) { - ERR("subst_run: Matched string is empty, invalid regexp?\n"); + LM_ERR("Matched string is empty, invalid regexp?\n"); goto error; } *crt=pkg_malloc(sizeof(struct replace_lst)); if (*crt==0){ - LOG(L_ERR, "ERROR: subst_run: out of mem (crt)\n"); + LM_ERR("out of mem\n"); goto error; } memset(*crt, 0, sizeof(struct replace_lst)); @@ -527,12 +521,12 @@ str* subst_str(const char *input, struct sip_msg* msg, struct subst_expr* se, len+=(int)(l->rpl.len)-l->size; res=pkg_malloc(sizeof(str)); if (res==0){ - LOG(L_ERR, "ERROR: subst_str: mem. allocation error\n"); + LM_ERR("mem. allocation error\n"); goto error; } res->s=pkg_malloc(len+1); /* space for null termination */ if (res->s==0){ - LOG(L_ERR, "ERROR: subst_str: mem. allocation error (res->s)\n"); + LM_ERR("mem. allocation error (res->s)\n"); goto error; } res->s[len]=0;
[View Less]
10 years, 3 months
1
0
0
0
git:master: raw_listener.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 6537bcc04971be84c5006a39c76cd58167c177ef URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6537bcc…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 20:50:10 2014 -0400 raw_listener.c: logging: convert LOG to LM_* --- raw_listener.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/raw_listener.c b/raw_listener.c index
…
[View More]
5656a74..5ff9e31 100644 --- a/raw_listener.c +++ b/raw_listener.c @@ -101,8 +101,7 @@ int raw_udp4_rcv_loop(int rsock, int port1, int port2) len=raw_udp4_recv(rsock, &p, BUF_SIZE, &from, &to, &rf); if (len<0){ if (len==-1){ - LOG(L_ERR, "ERROR: raw_udp4_rcv_loop:raw_udp4_recv: %s [%d]\n", - strerror(errno), errno); + LM_ERR("raw_udp4_recv: %s [%d]\n", strerror(errno), errno); if ((errno==EINTR)||(errno==EWOULDBLOCK)) continue; else @@ -128,8 +127,7 @@ int raw_udp4_rcv_loop(int rsock, int port1, int port2) } if (ri.src_port==0){ tmp=ip_addr2a(&ri.src_ip); - LOG(L_INFO, "raw_udp4_rcv_loop: dropping 0 port packet from %s\n", - tmp); + LM_INFO("dropping 0 port packet from %s\n", tmp); continue; } tmp=ip_addr2a(&ri.src_ip);
[View Less]
10 years, 3 months
1
0
0
0
git:master: pt.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 7afea2225e210cd8652dea22f4813d82c20126ee URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7afea22…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 20:48:51 2014 -0400 pt.c: logging: convert LOG to LM_* --- pt.c | 49 +++++++++++++++++++------------------------------ 1 files changed, 19 insertions(+), 30 deletions(-) diff --git a/pt.c b/pt.c
…
[View More]
index 9721869..bec1c4e 100644 --- a/pt.c +++ b/pt.c @@ -122,7 +122,7 @@ int init_pt(int proc_no) process_lock = lock_alloc(); process_lock = lock_init(process_lock); if (pt==0||process_count==0||process_lock==0){ - LOG(L_ERR, "ERROR: out of memory\n"); + LM_ERR("out of memory\n"); return -1; } memset(pt, 0, sizeof(struct process_table)*estimated_proc_no); @@ -147,7 +147,7 @@ int init_pt(int proc_no) int register_procs(int no) { if (pt){ - LOG(L_CRIT, "BUG: register_procs(%d) called at runtime\n", no); + LM_CRIT("(%d) called at runtime\n", no); return -1; } estimated_proc_no+=no; @@ -160,8 +160,7 @@ int register_procs(int no) int get_max_procs() { if (pt==0){ - LOG(L_CRIT, "BUG: get_max_procs() called too early " - "(it must _not_ be called from mod_init())\n"); + LM_CRIT("too early (it must _not_ be called from mod_init())\n"); abort(); /* crash to quickly catch offenders */ } return estimated_proc_no; @@ -189,8 +188,7 @@ int register_fds(int no) int get_max_open_fds() { if (pt==0){ - LOG(L_CRIT, "BUG: get_max_open_fds() called too early " - "(it must _not_ be called from mod_init())\n"); + LM_CRIT("too early (it must _not_ be called from mod_init())\n"); abort(); /* crash to quickly catch offenders */ } return estimated_fds_no; @@ -272,19 +270,18 @@ int fork_process(int child_id, char *desc, int make_sock) sockfd[0]=sockfd[1]=-1; if(make_sock && !tcp_disable){ if (!is_main){ - LOG(L_CRIT, "BUG: fork_process(..., 1) called from a non " + LM_CRIT("called from a non " "\"main\" process! If forking from a module's " "child_init() fork only if rank==PROC_MAIN or" " give up tcp send support (use 0 for make_sock)\n"); goto error; } if (tcp_main_pid){ - LOG(L_CRIT, "BUG: fork_process(..., 1) called, but tcp main " - " is already started\n"); + LM_CRIT("called, but tcp main is already started\n"); goto error; } if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockfd)<0){ - LOG(L_ERR, "ERROR: fork_process(): socketpair failed: %s\n", + LM_ERR("socketpair failed: %s\n", strerror(errno)); goto error; } @@ -292,8 +289,7 @@ int fork_process(int child_id, char *desc, int make_sock) #endif lock_get(process_lock); if (*process_count>=estimated_proc_no) { - LOG(L_CRIT, "ERROR: fork_process(): Process limit of %d exceeded." - " Will simulate fork fail.\n", estimated_proc_no); + LM_CRIT("Process limit of %d exceeded. Will simulate fork fail.\n", estimated_proc_no); lock_release(process_lock); goto error; } @@ -341,9 +337,8 @@ int fork_process(int child_id, char *desc, int make_sock) } #endif if ((child_id!=PROC_NOCHLDINIT) && (init_child(child_id) < 0)) { - LOG(L_ERR, "ERROR: fork_process(): init_child failed for " - " process %d, pid %d, \"%s\"\n", process_no, - pt[process_no].pid, pt[process_no].desc); + LM_ERR("init_child failed for process %d, pid %d, \"%s\"\n", + process_no, pt[process_no].pid, pt[process_no].desc); return -1; } return pid; @@ -405,36 +400,31 @@ int fork_tcp_process(int child_id, char *desc, int r, int *reader_fd_1) ret=-1; if (!is_main){ - LOG(L_CRIT, "BUG: fork_tcp_process() called from a non \"main\" " - "process\n"); + LM_CRIT("called from a non \"main\" process\n"); goto error; } if (tcp_main_pid){ - LOG(L_CRIT, "BUG: fork_tcp_process(..., 1) called _after_ starting" - " tcp main\n"); + LM_CRIT("called _after_ starting tcp main\n"); goto error; } if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockfd)<0){ - LOG(L_ERR, "ERROR: fork_tcp_process(): socketpair failed: %s\n", - strerror(errno)); + LM_ERR("socketpair failed: %s\n", strerror(errno)); goto error; } if (socketpair(AF_UNIX, SOCK_STREAM, 0, reader_fd)<0){ - LOG(L_ERR, "ERROR: fork_tcp_process(): socketpair failed: %s\n", - strerror(errno)); + LM_ERR("socketpair failed: %s\n", strerror(errno)); goto error; } if (tcp_fix_child_sockets(reader_fd)<0){ - LOG(L_ERR, "ERROR: fork_tcp_process(): failed to set non blocking" - "on child sockets\n"); + LM_ERR("failed to set non blocking on child sockets\n"); /* continue, it's not critical (it will go slower under * very high connection rates) */ } lock_get(process_lock); /* set the local process_no */ if (*process_count>=estimated_proc_no) { - LOG(L_CRIT, "ERROR: fork_tcp_process(): Process limit of %d exceeded." - " Simulating fork fail\n", estimated_proc_no); + LM_CRIT("Process limit of %d exceeded. Simulating fork fail\n", + estimated_proc_no); lock_release(process_lock); goto error; } @@ -485,9 +475,8 @@ int fork_tcp_process(int child_id, char *desc, int r, int *reader_fd_1) close(reader_fd[0]); if (reader_fd_1) *reader_fd_1=reader_fd[1]; if ((child_id!=PROC_NOCHLDINIT) && (init_child(child_id) < 0)) { - LOG(L_ERR, "ERROR: fork_tcp_process(): init_child failed for " - "process %d, pid %d, \"%s\"\n", process_no, - pt[process_no].pid, pt[process_no].desc); + LM_ERR("init_child failed for process %d, pid %d, \"%s\"\n", + process_no, pt[process_no].pid, pt[process_no].desc); return -1; } return pid;
[View Less]
10 years, 3 months
1
0
0
0
git:master: proxy.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: 4283934eac82b063596bf32158d6a98bcb542816 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4283934…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 20:40:59 2014 -0400 proxy.c: logging: convert LOG to LM_* --- proxy.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/proxy.c b/proxy.c index ee123e0..98343c8 100644 ---
…
[View More]
a/proxy.c +++ b/proxy.c @@ -189,7 +189,7 @@ static int hostent_cpy(struct hostent *dst, struct hostent* src) int ret; HOSTENT_CPY(dst, src, pkg_malloc, pkg_free); error: - LOG(L_CRIT, "ERROR: hostent_cpy: memory allocation failure\n"); + LM_CRIT("memory allocation failure\n"); return ret; } @@ -199,7 +199,7 @@ static int hostent_shm_cpy(struct hostent *dst, struct hostent* src) int ret; HOSTENT_CPY(dst, src, shm_malloc, shm_free); error: - LOG(L_CRIT, "ERROR: hostent_shm_cpy: memory allocation failure\n"); + LM_CRIT("memory allocation failure\n"); return ret; } @@ -241,7 +241,7 @@ error: p=(struct proxy_l*) p_malloc(sizeof(struct proxy_l)); \ if (p==0){ \ ser_error=E_OUT_OF_MEM; \ - ERR("ERROR: mk_proxy: memory allocation failure\n"); \ + LM_ERR("memory allocation failure\n"); \ goto error; \ } \ memset(p,0,sizeof(struct proxy_l)); \ @@ -253,7 +253,7 @@ error: he=sip_resolvehost(name, &(p->port), &proto); \ if (he==0){ \ ser_error=E_BAD_ADDRESS; \ - LOG(L_CRIT, "ERROR: mk_proxy: could not resolve hostname:" \ + LM_CRIT("could not resolve hostname:" \ " \"%.*s\"\n", name->len, name->s); \ p_free(p); \ goto error; \ @@ -294,7 +294,7 @@ struct proxy_l* mk_proxy_from_ip(struct ip_addr* ip, unsigned short port, p=(struct proxy_l*) pkg_malloc(sizeof(struct proxy_l)); if (p==0){ - LOG(L_CRIT, "ERROR: mk_proxy_from_ip: memory allocation failure\n"); + LM_CRIT("memory allocation failure\n"); goto error; } memset(p,0,sizeof(struct proxy_l));
[View Less]
10 years, 3 months
1
0
0
0
git:master: msg_translator.c: logging: convert LOG to LM_*
by Ovidiu Sas
Module: sip-router Branch: master Commit: eeeb3693f93bae48f300ca916668510cf329bd69 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=eeeb369…
Author: Ovidiu Sas <osas(a)voipembedded.com> Committer: Ovidiu Sas <osas(a)voipembedded.com> Date: Fri Oct 3 20:38:22 2014 -0400 msg_translator.c: logging: convert LOG to LM_* --- msg_translator.c | 214 +++++++++++++++++++++--------------------------------- 1 files changed, 83 insertions(+), 131 deletions(-)
…
[View More]
Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=eee…
[View Less]
10 years, 3 months
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200