Module: sip-router Branch: master Commit: eaf74185d78bb9d3edea50c84dbebb32571c2fb2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=eaf74185...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Fri Oct 3 14:28:48 2014 -0400
ut.h: logging: convert LOG to LM_*
---
ut.h | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/ut.h b/ut.h index aa7f33c..3c4a614 100644 --- a/ut.h +++ b/ut.h @@ -316,7 +316,7 @@ static inline char* int2strbuf(unsigned long l, char *r, int r_size, int* len) l/=10; }while(l && (i>=0)); if (l && (i<0)){ - LOG(L_CRIT, "BUG: int2str: overflow\n"); + LM_CRIT("overflow\n"); } if (len) *len=(INT2STR_MAX_LEN-2)-i; return &r[i+1]; @@ -558,7 +558,7 @@ inline static int hex2int(char hex_digit) if (hex_digit>='A' && hex_digit<='F') return hex_digit-'A'+10; /* no valid hex digit ... */ - LOG(L_ERR, "ERROR: hex2int: '%c' is no hex char\n", hex_digit ); + LM_ERR("'%c' is no hex char\n", hex_digit ); return -1; }
@@ -581,7 +581,7 @@ inline static int un_escape(str *user, str *new_user ) int hi, lo;
if( new_user==0 || new_user->s==0) { - LOG(L_CRIT, "BUG: un_escape: called with invalid param\n"); + LM_CRIT("invalid param\n"); return -1; }
@@ -591,28 +591,27 @@ inline static int un_escape(str *user, str *new_user ) for (i = 0; i < user->len; i++) { if (user->s[i] == '%') { if (i + 2 >= user->len) { - LOG(L_ERR, "ERROR: un_escape: escape sequence too short in" - " '%.*s' @ %d\n", + LM_ERR("escape sequence too short in '%.*s' @ %d\n", user->len, user->s, i ); goto error; } hi=hex2int(user->s[i + 1]); if (hi<0) { - LOG(L_ERR, "ERROR: un_escape: non-hex high digit in an escape sequence in" + LM_ERR("non-hex high digit in an escape sequence in" " '%.*s' @ %d\n", user->len, user->s, i+1 ); goto error; } lo=hex2int(user->s[i + 2]); if (lo<0) { - LOG(L_ERR, "ERROR: non-hex low digit in an escape sequence in " + LM_ERR("non-hex low digit in an escape sequence in " "'%.*s' @ %d\n", user->len, user->s, i+2 ); goto error; } value=(hi<<4)+lo; if (value < 32 || value > 126) { - LOG(L_ERR, "ERROR: non-ASCII escaped character in '%.*s' @ %d\n", + LM_ERR("non-ASCII escaped character in '%.*s' @ %d\n", user->len, user->s, i ); goto error; }