Browse code

Merge a8f52fd86a59f8f411ebc063f09eb54cb3047b6c into 5e3f7e1557d90a3e6f40eff41cc0b0bb317ab544

Giacomo Vacca authored on 13/05/2021 22:51:40 • GitHub committed on 13/05/2021 22:51:40
Showing 2 changed files
... ...
@@ -2653,6 +2653,11 @@ int reply_received( struct sip_msg  *p_msg )
2653 2653
 		}
2654 2654
 #endif
2655 2655
 
2656
+	if (t->flags & T_ASYNC_SUSPENDED) {
2657
+		LM_DBG("Reply for suspended transaction, done.\n");
2658
+		goto done;
2659
+	}
2660
+
2656 2661
 	if (unlikely(p_msg->msg_flags&FL_RPL_SUSPENDED)) {
2657 2662
 		/* suspended the reply (async) - no error */
2658 2663
 		goto done;
... ...
@@ -404,6 +404,14 @@ int t_continue_helper(unsigned int hash_index, unsigned int label,
404 404
 		LM_DBG("restoring previous environment\n");
405 405
 		faked_env( t, 0, 1);
406 406
 
407
+		if (t->flags & T_ASYNC_SUSPENDED) {
408
+			LM_DBG("The transaction is suspended, so not continuing\n");
409
+			t->flags &= ~T_ASYNC_CONTINUE;
410
+			UNLOCK_ASYNC_CONTINUE(t);
411
+			set_t(backup_T, backup_T_branch);
412
+			return 0;
413
+		}
414
+
407 415
 		/*lock transaction replies - will be unlocked when reply is relayed*/
408 416
 		LOCK_REPLIES( t );
409 417
 		if ( is_local(t) ) {