gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36506 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r36506 - gnunet/src/transport
Date: Sat, 17 Oct 2015 00:19:35 +0200

Author: grothoff
Date: 2015-10-17 00:19:35 +0200 (Sat, 17 Oct 2015)
New Revision: 36506

Modified:
   gnunet/src/transport/gnunet-service-transport_ats.c
Log:
-fix destroy_ai

Modified: gnunet/src/transport/gnunet-service-transport_ats.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_ats.c 2015-10-16 17:03:09 UTC 
(rev 36505)
+++ gnunet/src/transport/gnunet-service-transport_ats.c 2015-10-16 22:19:35 UTC 
(rev 36506)
@@ -546,12 +546,17 @@
  * Release memory used by the given address data.
  *
  * @param ai the `struct AddressInfo`
- */ 
+ */
 static void
 destroy_ai (struct AddressInfo *ai)
 {
   GNUNET_assert (NULL == ai->session);
-  GNUNET_assert (NULL == ai->unblock_task);
+  if (NULL != ai->unblock_task)
+  {
+    GNUNET_SCHEDULER_cancel (ai->unblock_task);
+    ai->unblock_task = NULL;
+    num_blocked--;
+  }
   GNUNET_assert (GNUNET_YES ==
                  GNUNET_CONTAINER_multipeermap_remove (p2a,
                                                        &ai->address->peer,
@@ -608,7 +613,7 @@
        "Telling ATS to destroy session %p from peer %s\n",
        session,
        GNUNET_i2s (&address->peer));
-  if (GNUNET_YES == ai->expired) 
+  if (GNUNET_YES == ai->expired)
   {
     /* last reason to keep this 'ai' around is now gone, the
        session is dead as well, clean up */
@@ -758,12 +763,6 @@
     GNUNET_assert (0);
     return;
   }
-  if (NULL != ai->unblock_task)
-  {
-    GNUNET_SCHEDULER_cancel (ai->unblock_task);
-    ai->unblock_task = NULL;
-    num_blocked--;
-  }
   if (NULL != ai->session)
   {
     ai->expired = GNUNET_YES;
@@ -798,12 +797,6 @@
 {
   struct AddressInfo *ai = value;
 
-  if (NULL != ai->unblock_task)
-  {
-    GNUNET_SCHEDULER_cancel (ai->unblock_task);
-    ai->unblock_task = NULL;
-    num_blocked--;
-  }
   destroy_ai (ai);
   return GNUNET_OK;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]