[sr-dev] git:master: tm: reset T if t_continue() resumes a canceled transaction

Daniel-Constantin Mierla miconda at gmail.com
Fri Apr 20 15:40:12 CEST 2012


Module: sip-router
Branch: master
Commit: 00193f5e1f0e9e12b55c50d33eaf6f3d32e8bb92
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=00193f5e1f0e9e12b55c50d33eaf6f3d32e8bb92

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Apr 20 15:35:49 2012 +0200

tm: reset T if t_continue() resumes a canceled transaction

- when the suspended transaction was already canceled, and t_continue
  was executed before transaction was destroyed, global variable T was
  left set, causing an extra unref by post script callback

---

 modules/tm/t_suspend.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
index e6e2e35..35adcb1 100644
--- a/modules/tm/t_suspend.c
+++ b/modules/tm/t_suspend.c
@@ -133,6 +133,8 @@ int t_continue(unsigned int hash_index, unsigned int label,
 		/* The transaction has already been canceled,
 		 * needless to continue */
 		UNREF(t); /* t_unref would kill the transaction */
+		/* reset T as we have no working T anymore */
+		set_t(T_UNDEFINED, T_BR_UNDEFINED);
 		return 1;
 	}
 




More information about the sr-dev mailing list