gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r18007 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r18007 - gnunet/src/testing
Date: Fri, 4 Nov 2011 21:34:14 +0100

Author: bartpolot
Date: 2011-11-04 21:34:14 +0100 (Fri, 04 Nov 2011)
New Revision: 18007

Modified:
   gnunet/src/testing/testing.c
Log:
Reduced duplication

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2011-11-04 20:06:04 UTC (rev 18006)
+++ gnunet/src/testing/testing.c        2011-11-04 20:34:14 UTC (rev 18007)
@@ -1830,18 +1830,6 @@
     ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK;
   }
 
-  if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
-  {
-    if (ctx->d1th != NULL)
-      GNUNET_TRANSPORT_disconnect (ctx->d1th);
-    ctx->d1th = NULL;
-    if (ctx->d1core != NULL)
-      GNUNET_CORE_disconnect (ctx->d1core);
-    ctx->d1core = NULL;
-    GNUNET_free (ctx);
-    return;
-  }
-
   if (ctx->d1th != NULL)
     GNUNET_TRANSPORT_disconnect (ctx->d1th);
   ctx->d1th = NULL;
@@ -1849,6 +1837,12 @@
     GNUNET_CORE_disconnect (ctx->d1core);
   ctx->d1core = NULL;
 
+  if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
+  {
+    GNUNET_free (ctx);
+    return;
+  }
+
   if (ctx->connected == GNUNET_YES)
   {
     if (ctx->cb != NULL)




reply via email to

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