Преглед изворни кода

- fixed t_uac 0 fr_timer (reported by Stefan Sayer) : all the fifo created
transaction will have the default tm timer (fr_inv_timer, fr_timer). They will
not be affected by t_set_fr or the fr_timer avps.

Andrei Pelinescu-Onciul пре 20 година
родитељ
комит
bb050b70e2
2 измењених фајлова са 10 додато и 1 уклоњено
  1. 1 1
      Makefile.defs
  2. 9 0
      modules/tm/uac.c

+ 1 - 1
Makefile.defs

@@ -61,7 +61,7 @@ MAIN_NAME=ser
 VERSION = 0
 PATCHLEVEL = 10
 SUBLEVEL =   99
-EXTRAVERSION = -dev29-tm-timers
+EXTRAVERSION = -dev30-tm-timers
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")

+ 9 - 0
modules/tm/uac.c

@@ -50,6 +50,8 @@
  *  2004-02-11  FIFO/CANCEL + alignments (hash=f(callid,cseq)) (uli+jiri)
  *  2004-02-13  t->is_invite, t->local, t->noisy_ctimer replaced (bogdan)
  *  2004-08-23  avp support in t_uac (bogdan)
+ *  2005-12-16  t_uac will set the new_cell timers to the default values,
+ *               fixes 0 fr_timer bug (andrei)
  */
 
 #include <string.h>
@@ -200,6 +202,13 @@ int t_uac(str* method, str* headers, str* body, dlg_t* dialog,
 		LOG(L_ERR, "t_uac: short of cell shmem\n");
 		goto error2;
 	}
+	/* init timers hack, new_cell->fr_timer and new_cell->fr_inv_timer
+	 * must be set, or else the fr will happen immediately
+	 * we can't call init_new_t() because we don't have a sip msg
+	 * => we'll ignore t_set_fr() or avp timer value and will use directly the
+	 * module params fr_inv_timer and fr_timer -- andrei */
+	new_cell->fr_timeout=fr_timeout;
+	new_cell->fr_inv_timeout=fr_inv_timeout;
 
 	/* better reset avp list now - anyhow, it's useless from
 	 * this point (bogdan) */