fix
authorChristian Grothoff <christian@grothoff.org>
Fri, 8 Oct 2010 16:14:31 +0000 (16:14 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 8 Oct 2010 16:14:31 +0000 (16:14 +0000)
src/fs/gnunet-service-fs.c

index 5118cb56cd61ba8c5dcbb9c9c8604cdbef191b9d..0f603651ea4bfc0680831763f5814c65edae62ac 100644 (file)
@@ -2016,11 +2016,13 @@ transmit_to_peer (void *cls,
       memcpy (&cbuf[msize], &pm[1], pm->msize);
       msize += pm->msize;
       size -= pm->msize;
-      GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head,
-                                  cp->pending_messages_tail,
-                                  pm);
       if (NULL == pm->pml)
-       cp->pending_requests--;
+       {
+         GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head,
+                                      cp->pending_messages_tail,
+                                      pm);
+         cp->pending_requests--;
+       }
       destroy_pending_message (pm, cp->pid);
     }
   if (pm != NULL)