gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r15349 - gnunet/src/datastore


From: gnunet
Subject: [GNUnet-SVN] r15349 - gnunet/src/datastore
Date: Mon, 30 May 2011 15:27:24 +0200

Author: grothoff
Date: 2011-05-30 15:27:24 +0200 (Mon, 30 May 2011)
New Revision: 15349

Modified:
   gnunet/src/datastore/datastore_api.c
Log:
proper shutdown

Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c        2011-05-30 12:45:32 UTC (rev 
15348)
+++ gnunet/src/datastore/datastore_api.c        2011-05-30 13:27:24 UTC (rev 
15349)
@@ -325,6 +325,11 @@
       GNUNET_SCHEDULER_cancel (h->reconnect_task);
       h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
     }
+  if (NULL != h->th)
+    {
+      GNUNET_CLIENT_notify_transmit_ready_cancel (h->th);
+      h->th = NULL;
+    }
   while (NULL != (qe = h->queue_head))
     {
       GNUNET_assert (NULL != qe->response_proc);
@@ -344,11 +349,13 @@
                                                   h))
            return;
          GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+         h->client = NULL;
        }
       GNUNET_break (0);
     }
   GNUNET_STATISTICS_destroy (h->stats,
                             GNUNET_NO);
+  h->stats = NULL;
   GNUNET_free (h);
 }
 
@@ -603,6 +610,7 @@
   qe->was_transmitted = GNUNET_YES;
   GNUNET_SCHEDULER_cancel (qe->task);
   qe->task = GNUNET_SCHEDULER_NO_TASK;
+  GNUNET_assert (GNUNET_NO == h->in_receive);
   h->in_receive = GNUNET_YES;
   GNUNET_CLIENT_receive (h->client,
                         qe->response_proc,
@@ -675,6 +683,8 @@
                                               GNUNET_YES,
                                               &transmit_request,
                                               h);
+  GNUNET_assert (GNUNET_NO == h->in_receive);
+  GNUNET_break (NULL != h->th);
 }
 
 




reply via email to

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