do not remove from queue if already transmitted
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 May 2011 15:48:47 +0000 (15:48 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 May 2011 15:48:47 +0000 (15:48 +0000)
src/datastore/datastore_api.c

index 07e48931e61c0c5a1bb375f9268c63ae65a6d635..9738588a7d4073b9c054f4addc8da3ec35091e3d 100644 (file)
@@ -465,7 +465,8 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h,
   pos = ret->next;
   while (pos != NULL) 
     {
-      if (pos->max_queue < h->queue_size)
+      if ( (pos->max_queue < h->queue_size) &&
+          (pos->was_transmitted == GNUNET_NO) )
        {
          GNUNET_assert (pos->response_proc != NULL);
          /* move 'pos' element to head so that it will be