fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 15 Mar 2011 14:02:06 +0000 (14:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 15 Mar 2011 14:02:06 +0000 (14:02 +0000)
src/fs/gnunet-service-fs_pe.c

index 7b0f874fff5524018f472b3f6552f0797ad55327..816328392646fabccbac48743210ae63d4c93678 100644 (file)
@@ -174,6 +174,7 @@ transmit_message_callback (void *cls,
   struct GSF_RequestPlan *rp;
   size_t msize;
 
+  pp->pth = NULL;
   if (NULL == buf)
     {
       /* failed, try again... */
@@ -181,6 +182,11 @@ transmit_message_callback (void *cls,
       return 0;
     }
   rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
+  if (NULL == rp)
+    {
+      pp->task = GNUNET_SCHEDULER_add_now (&schedule_peer_transmission, pp);
+      return 0;
+    }
   msize = GSF_pending_request_get_message_ (rp->pr, buf_size, buf);
   if (msize > buf_size)
     {