gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r11438 - gnunet/src/datastore
Date: Wed, 19 May 2010 21:52:35 +0200

Author: grothoff
Date: 2010-05-19 21:52:35 +0200 (Wed, 19 May 2010)
New Revision: 11438

Modified:
   gnunet/src/datastore/datastore_api.c
Log:
fix

Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c        2010-05-19 19:30:06 UTC (rev 
11437)
+++ gnunet/src/datastore/datastore_api.c        2010-05-19 19:52:35 UTC (rev 
11438)
@@ -415,7 +415,6 @@
   if (c > max_queue_size)
     {
       response_proc (ret, NULL);
-      GNUNET_free (ret);
       return NULL;
     }
   ret->task = GNUNET_SCHEDULER_add_delayed (h->sched,
@@ -1008,21 +1007,25 @@
   struct GNUNET_DATASTORE_Handle *h = qe->h;
   struct ResultContext rc = qe->qc.rc;
   const struct DataMessage *dm;
+  int was_transmitted;
 
-  GNUNET_assert (h->queue_head == qe);
   if (msg == NULL)
     {
 #if DEBUG_DATASTORE
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                 _("Failed to receive response from datastore\n"));
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Failed to receive response from datastore or queue full\n");
 #endif
+      was_transmitted = qe->was_transmitted;
       free_queue_entry (qe);
-      do_disconnect (h);
+      if (GNUNET_YES == was_transmitted)       
+       do_disconnect (h);
       rc.iter (rc.iter_cls,
               NULL, 0, NULL, 0, 0, 0, 
               GNUNET_TIME_UNIT_ZERO_ABS, 0);   
       return;
     }
+  GNUNET_assert (GNUNET_YES == qe->was_transmitted);
+  GNUNET_assert (h->queue_head == qe);
   if (ntohs(msg->type) == GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END) 
     {
       GNUNET_break (ntohs(msg->size) == sizeof(struct GNUNET_MessageHeader));




reply via email to

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