[sr-dev] git:master: local_timer.c: logging: convert LOG to LM_*

Ovidiu Sas osas at voipembedded.com
Fri Oct 3 22:36:40 CEST 2014


Module: sip-router
Branch: master
Commit: 0fe3535561dba78824e973c099aec2444b02601c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0fe3535561dba78824e973c099aec2444b02601c

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Fri Oct  3 16:36:35 2014 -0400

local_timer.c: logging: convert LOG to LM_*

---

 local_timer.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/local_timer.c b/local_timer.c
index 87a85c0..1673e0e 100644
--- a/local_timer.c
+++ b/local_timer.c
@@ -93,8 +93,7 @@ static inline int _local_timer_dist_tl(struct local_timer* h,
 {
 	if (likely(delta<H0_ENTRIES)){
 		if (unlikely(delta==0)){
-			LOG(L_WARN, "WARNING: local_timer: add_timeout: 0 expire timer"
-						" added\n");
+			LM_WARN("0 expire timer added\n");
 			_timer_add_list(&h->timer_lst.expired, tl);
 		}else{
 			_timer_add_list( &h->timer_lst.h0[tl->expire & H0_MASK], tl);
@@ -162,8 +161,7 @@ int local_timer_add(struct local_timer* h, struct timer_ln* tl, ticks_t delta,
 	}
 	tl->initial_timeout=delta;
 	if (unlikely((tl->next!=0) || (tl->prev!=0))){
-		LOG(L_CRIT, "BUG: tcp_timer_add: called with linked timer:"
-				" %p (%p, %p)\n", tl, tl->next, tl->prev);
+		LM_CRIT("called with linked timer: %p (%p, %p)\n", tl, tl->next, tl->prev);
 		ret=-1;
 		goto error;
 	}
@@ -256,7 +254,7 @@ void local_timer_run(struct local_timer* lt, ticks_t saved_ticks)
 	
 		/* protect against time running backwards */
 		if (unlikely(lt->prev_ticks>=saved_ticks)){
-			LOG(L_CRIT, "BUG: local_timer: backwards or still time\n");
+			LM_CRIT("backwards or still time\n");
 			/* try to continue */
 			lt->prev_ticks=saved_ticks-1;
 			return;




More information about the sr-dev mailing list