task-manager: Only trigger retransmit cleared alert if there was at least one retransmit
authorTobias Brunner <tobias@strongswan.org>
Tue, 4 Oct 2016 15:44:14 +0000 (17:44 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 5 Oct 2016 14:01:14 +0000 (16:01 +0200)
The counter is already increased when sending the original message.

Fixes: bd71ba0ffb03 ("task-manager: Add retransmit cleared alert")

src/libcharon/sa/ikev1/task_manager_v1.c
src/libcharon/sa/ikev2/task_manager_v2.c

index 37112b3..3b0c1cf 100644 (file)
@@ -1189,7 +1189,7 @@ static status_t process_response(private_task_manager_t *this,
        }
        enumerator->destroy(enumerator);
 
-       if (this->initiating.retransmitted)
+       if (this->initiating.retransmitted > 1)
        {
                packet_t *packet = NULL;
                array_get(this->initiating.packets, 0, &packet);
index ab0a2a2..60a262f 100644 (file)
@@ -709,7 +709,7 @@ static status_t process_response(private_task_manager_t *this,
        }
        enumerator->destroy(enumerator);
 
-       if (this->initiating.retransmitted)
+       if (this->initiating.retransmitted > 1)
        {
                packet_t *packet = NULL;
                array_get(this->initiating.packets, 0, &packet);