Prechádzať zdrojové kódy

local_timer.c: logging: convert LOG to LM_*

Ovidiu Sas 10 rokov pred
rodič
commit
0fe3535561
1 zmenil súbory, kde vykonal 3 pridanie a 5 odobranie
  1. 3 5
      local_timer.c

+ 3 - 5
local_timer.c

@@ -93,8 +93,7 @@ static inline int _local_timer_dist_tl(struct local_timer* h,
 {
 {
 	if (likely(delta<H0_ENTRIES)){
 	if (likely(delta<H0_ENTRIES)){
 		if (unlikely(delta==0)){
 		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);
 			_timer_add_list(&h->timer_lst.expired, tl);
 		}else{
 		}else{
 			_timer_add_list( &h->timer_lst.h0[tl->expire & H0_MASK], tl);
 			_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;
 	tl->initial_timeout=delta;
 	if (unlikely((tl->next!=0) || (tl->prev!=0))){
 	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;
 		ret=-1;
 		goto error;
 		goto error;
 	}
 	}
@@ -256,7 +254,7 @@ void local_timer_run(struct local_timer* lt, ticks_t saved_ticks)
 	
 	
 		/* protect against time running backwards */
 		/* protect against time running backwards */
 		if (unlikely(lt->prev_ticks>=saved_ticks)){
 		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 */
 			/* try to continue */
 			lt->prev_ticks=saved_ticks-1;
 			lt->prev_ticks=saved_ticks-1;
 			return;
 			return;