Browse code

tm: t_suspend.c - unlock t_continue and reset flag if suspended again

Giacomo Vacca authored on 03/05/2021 12:20:14
Showing 1 changed files
... ...
@@ -401,15 +401,17 @@ int t_continue_helper(unsigned int hash_index, unsigned int label,
401 401
 			exec_post_script_cb(t->uac[branch].reply, cb_type);
402 402
 		}
403 403
 
404
+		LM_DBG("restoring previous environment\n");
405
+		faked_env( t, 0, 1);
406
+
404 407
 		if (t->flags & T_ASYNC_SUSPENDED) {
405 408
 			LM_DBG("The transaction is suspended, so not continuing\n");
409
+			t->flags &= ~T_ASYNC_CONTINUE;
410
+			UNLOCK_ASYNC_CONTINUE(t);
406 411
 			set_t(backup_T, backup_T_branch);
407 412
 			return 0;
408 413
 		}
409 414
 
410
-		LM_DBG("restoring previous environment\n");
411
-		faked_env( t, 0, 1);
412
-
413 415
 		/*lock transaction replies - will be unlocked when reply is relayed*/
414 416
 		LOCK_REPLIES( t );
415 417
 		if ( is_local(t) ) {