Prechádzať zdrojové kódy

tm: reset async suspended flag when continuing via failure_route

- suspended transaction can be resumed automatically on timeout, without
  t_continue(), ending up in failure_route
Daniel-Constantin Mierla 10 rokov pred
rodič
commit
171553ebca
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      modules/tm/t_reply.c

+ 2 - 0
modules/tm/t_reply.c

@@ -982,6 +982,8 @@ int run_failure_handlers(struct cell *t, struct sip_msg *rpl,
 		 * set next failure route, failure_route will not be reentered
 		 * on failure */
 		t->on_failure=0;
+		/* if continuing on timeout of a suspended transaction, reset the flag */
+		t->flags &= ~T_ASYNC_SUSPENDED;
 		if (exec_pre_script_cb(&faked_req, FAILURE_CB_TYPE)>0) {
 			/* run a failure_route action if some was marked */
 			if (run_top_route(failure_rt.rlist[on_failure], &faked_req, 0)<0)