dnc
authorChristian Grothoff <christian@grothoff.org>
Thu, 16 Jun 2011 12:58:43 +0000 (12:58 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 16 Jun 2011 12:58:43 +0000 (12:58 +0000)
src/datastore/datastore_api.c

index 2ce58e8fb80f5db8059ff67069a83df5b85d71e1..6eafbee8bae6a89d30ffb6d94841679a2d6a25d6 100644 (file)
@@ -1295,7 +1295,18 @@ process_result_message (void *cls,
     }
   qe = h->queue_head;
   rc = qe->qc.rc;
-  GNUNET_assert (GNUNET_YES == qe->was_transmitted);
+  if (GNUNET_YES != qe->was_transmitted)
+    {
+      GNUNET_break (0);
+      free_queue_entry (qe);
+      h->retry_time = GNUNET_TIME_UNIT_ZERO;
+      do_disconnect (h);
+      if (rc.proc != NULL)
+       rc.proc (rc.proc_cls,
+                NULL, 0, NULL, 0, 0, 0, 
+                GNUNET_TIME_UNIT_ZERO_ABS, 0);
+      return;
+    }
   if ( (ntohs(msg->size) < sizeof(struct DataMessage)) ||
        (ntohs(msg->type) != GNUNET_MESSAGE_TYPE_DATASTORE_DATA) ||
        (ntohs(msg->size) != sizeof(struct DataMessage) + ntohl (((const struct DataMessage*)msg)->size)) )