Only one transmit_content can go at a time
authorDavid Barksdale <amatus.amongus@gmail.com>
Wed, 7 Sep 2016 15:32:48 +0000 (15:32 +0000)
committerDavid Barksdale <amatus.amongus@gmail.com>
Wed, 7 Sep 2016 15:32:48 +0000 (15:32 +0000)
src/fs/gnunet-service-fs_push.c

index fe5d0e1e9d10a441c950c56ce5be75ced4b40645..361d30755d1ba1d2cb8b0bad51622eb02d81adab 100644 (file)
@@ -518,9 +518,11 @@ process_migration_content (void *cls,
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                "Preparing to push best content to peer %s\n",
                GNUNET_i2s (GSF_connected_peer_get_identity2_(pos->peer)));
-    if (GNUNET_YES == transmit_content (pos,
-                                       mb))
+    if ( (NULL == pos->env) &&
+         (GNUNET_YES == transmit_content (pos,
+                                          mb)) ) {
       break;                  /* 'mb' was freed! */
+    }
   }
   consider_gathering ();
 }