Selaa lähdekoodia

tm: fix retransmission disabled case

Commit a92001 broke the magic value (-1) used when retransmissions
were supposed to be disabled.

Reported-by:  Peter Dunkley  peter.dunkley crocodile-rcs com
Andrei Pelinescu-Onciul 14 vuotta sitten
vanhempi
commit
8ef99a9eec
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      modules/tm/timer.h

+ 1 - 1
modules/tm/timer.h

@@ -201,8 +201,8 @@ inline static int _set_fr_retr(struct retr_buf* rb, unsigned retr_ms)
 	ticks=get_ticks_raw();
 	timeout=rb->my_T->fr_timeout;
 	eol=rb->my_T->end_of_life;
+	retr_ticks = (retr_ms != (unsigned)(-1))?MS_TO_TICKS(retr_ms):retr_ms;
 	/* hack , next retr. int. */
-	retr_ticks = MS_TO_TICKS(retr_ms);
 	rb->timer.data=(void*)(unsigned long)(2*retr_ms);
 	rb->retr_expire=ticks + retr_ticks;
 	if (unlikely(rb->t_active)){