task-manager: Add retransmit count to retransmit send alert
authorThomas Egerer <thomas.egerer@secunet.com>
Tue, 16 Feb 2016 11:55:37 +0000 (12:55 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 6 Jun 2016 12:11:01 +0000 (14:11 +0200)
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
src/libcharon/bus/bus.h
src/libcharon/sa/ikev1/task_manager_v1.c
src/libcharon/sa/ikev2/task_manager_v2.c

index 8746cb8..182ced7 100644 (file)
@@ -101,8 +101,9 @@ enum alert_t {
        /** received IKE message with invalid body, argument is message_t*,
         *  followed by a status_t result returned by message_t.parse_body(). */
        ALERT_PARSE_ERROR_BODY,
-       /** sending a retransmit for a message, argument is packet_t, if the message
-        *  got fragmented only the first fragment is passed */
+       /** sending a retransmit for a message, arguments are packet_t and number
+        * of the retransmit, if the message got fragmented only the first fragment
+        * is passed */
        ALERT_RETRANSMIT_SEND,
        /** sending retransmits timed out, argument is packet_t, if available and if
         *  the message got fragmented only the first fragment is passed */
index 273936c..ea1177d 100644 (file)
@@ -361,7 +361,8 @@ static status_t retransmit_packet(private_task_manager_t *this, uint32_t seqnr,
                DBG1(DBG_IKE, "sending retransmit %u of %s message ID %u, seq %u",
                         retransmitted, seqnr < RESPONDING_SEQ ? "request" : "response",
                         mid, seqnr < RESPONDING_SEQ ? seqnr : seqnr - RESPONDING_SEQ);
-               charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND, packet);
+               charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND, packet,
+                                                  retransmitted);
        }
        send_packets(this, packets);
        lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)
index a7989c5..abbffb2 100644 (file)
@@ -352,7 +352,8 @@ METHOD(task_manager_t, retransmit, status_t,
                        {
                                DBG1(DBG_IKE, "retransmit %d of request with message ID %d",
                                         this->initiating.retransmitted, message_id);
-                               charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND, packet);
+                               charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND, packet,
+                                                                  this->initiating.retransmitted);
                        }
                        if (!mobike)
                        {