[sr-dev] git:4.3:4d1b658b: tsilo: Fix transaction removal to update list head

Federico Cabiddu federico.cabiddu at gmail.com
Tue Sep 1 16:30:47 CEST 2015


Module: kamailio
Branch: 4.3
Commit: 4d1b658b2b380349b7d74fae7083661a18f04bf1
URL: https://github.com/kamailio/kamailio/commit/4d1b658b2b380349b7d74fae7083661a18f04bf1

Author: Chris Double <chris.double at double.co.nz>
Committer: Federico Cabiddu <federico.cabiddu at gmail.com>
Date: 2015-09-01T16:30:30+02:00

tsilo: Fix transaction removal to update list head

- When transaction being removed is the head of the list,
  correctly update the head to point to the next transaction.

(cherry picked from commit 6ce6803d57dabe287d7d6fa859e93c1df402d821)

---

Modified: modules/tsilo/ts_hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/4d1b658b2b380349b7d74fae7083661a18f04bf1.diff
Patch: https://github.com/kamailio/kamailio/commit/4d1b658b2b380349b7d74fae7083661a18f04bf1.patch

---

diff --git a/modules/tsilo/ts_hash.c b/modules/tsilo/ts_hash.c
index cf529ee..7986991 100644
--- a/modules/tsilo/ts_hash.c
+++ b/modules/tsilo/ts_hash.c
@@ -396,8 +396,8 @@ void remove_ts_transaction(ts_transaction_t* ts_t)
 	if (ts_t->prev)
 		ts_t->prev->next = ts_t->next;
 
-	if ((ts_t->prev == NULL) && (ts_t->next == NULL))
-		ts_t->urecord->transactions = NULL;
+	if (ts_t->urecord->transactions == ts_t)
+		ts_t->urecord->transactions = ts_t->next;
 
 	free_ts_transaction((void*)ts_t);
 




More information about the sr-dev mailing list