gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r13561 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13561 - gnunet/src/dht
Date: Fri, 5 Nov 2010 11:47:06 +0100

Author: nevans
Date: 2010-11-05 11:47:05 +0100 (Fri, 05 Nov 2010)
New Revision: 13561

Modified:
   gnunet/src/dht/test_dht_twopeer.c
Log:
possible fix for dht testcase segfault

Modified: gnunet/src/dht/test_dht_twopeer.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer.c   2010-11-05 09:24:59 UTC (rev 13560)
+++ gnunet/src/dht/test_dht_twopeer.c   2010-11-05 10:47:05 UTC (rev 13561)
@@ -115,7 +115,7 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   if (peer1dht != NULL)
-      GNUNET_DHT_disconnect(peer1dht);
+    GNUNET_DHT_disconnect(peer1dht);
 
   if (peer2dht != NULL)
     GNUNET_DHT_disconnect(peer2dht);
@@ -136,9 +136,9 @@
   if (curr_get_ctx.get_handle != NULL)
   {
     GNUNET_DHT_get_stop(curr_get_ctx.get_handle);
-    GNUNET_SCHEDULER_add_now (sched, &end_badly_cont, NULL);
   }
 
+  GNUNET_SCHEDULER_add_now (sched, &end_badly_cont, NULL);
   ok = 1;
 }
 
@@ -237,6 +237,7 @@
   get_context->retry_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Get attempt %u failed, canceling 
request!\n", get_context->get_attempts);
   GNUNET_DHT_get_stop(get_context->get_handle);
+  get_context->get_handle = NULL;
   GNUNET_SCHEDULER_add_now(sched, &get_stop_finished, get_context);
 }
 




reply via email to

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