Browse Source

Merge pull request #311 from doublec/tsilo_transaction_fix

Change remove_ts_transaction so it updates head pointer of list
Federico Cabiddu 10 years ago
parent
commit
199202f453
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/tsilo/ts_hash.c

+ 2 - 2
modules/tsilo/ts_hash.c

@@ -396,8 +396,8 @@ void remove_ts_transaction(ts_transaction_t* ts_t)
 	if (ts_t->prev)
 	if (ts_t->prev)
 		ts_t->prev->next = ts_t->next;
 		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);
 	free_ts_transaction((void*)ts_t);