[3/7] alfred: Remove checks for committed/dropped transaction

Message ID 20161112092524.13170-3-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit df93eb154a4f33c75a7d269b00d2af12d23d456d
Delegated to: Simon Wunderlich
Headers

Commit Message

Sven Eckelmann Nov. 12, 2016, 9:25 a.m. UTC
  Transactions will be removed from the transaction has when they were
committed. Thus is is not necessary to check in the push_data/txend packet
processing functions for committed/dropped transactions.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 recv.c | 8 --------
 1 file changed, 8 deletions(-)
  

Patch

diff --git a/recv.c b/recv.c
index 6878e5e..21ea539 100644
--- a/recv.c
+++ b/recv.c
@@ -167,10 +167,6 @@  static int finish_alfred_transaction(struct globals *globals,
 {
 	struct transaction_packet *transaction_packet, *safe;
 
-	/* this transaction was already finished/dropped */
-	if (head->finished != 0)
-		return -1;
-
 	/* missing packets -> cleanup everything */
 	if (head->num_packet == num_packets)
 		head->finished = -1;
@@ -233,10 +229,6 @@  static int process_alfred_push_data(struct globals *globals,
 	}
 	clock_gettime(CLOCK_MONOTONIC, &head->last_rx_time);
 
-	/* this transaction was already finished/dropped */
-	if (head->finished != 0)
-		return -1;
-
 	found = 0;
 	list_for_each_entry(transaction_packet, &head->packet_list, list) {
 		if (transaction_packet->push->tx.seqno == push->tx.seqno) {