-fix
[oweals/gnunet.git] / src / fs / gnunet-service-fs_put.c
index ec2344b373d5a07ba158705dcd24d55600a474ce..3ac67136a68aaff388bcc22524cfeb0a8d56d5df 100644 (file)
@@ -82,18 +82,18 @@ static struct PutOperator operators[] = {
 
 /**
  * Task that is run periodically to obtain blocks for DHT PUTs.
- * 
+ *
  * @param cls type of blocks to gather
  * @param tc scheduler context (unused)
  */
-static void gather_dht_put_blocks (void *cls,
-                                   const struct GNUNET_SCHEDULER_TaskContext
-                                   *tc);
+static void
+gather_dht_put_blocks (void *cls,
+                       const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
  * Task that is run periodically to obtain blocks for DHT PUTs.
- * 
+ *
  * @param cls type of blocks to gather
  * @param tc scheduler context (unused)
  */
@@ -104,7 +104,7 @@ delay_dht_put_blocks (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct GNUNET_TIME_Relative delay;
 
   po->dht_task = GNUNET_SCHEDULER_NO_TASK;
-  if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+  if (tc != NULL && 0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
     return;
   if (po->zero_anonymity_count_estimate > 0)
   {
@@ -156,20 +156,19 @@ process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size,
   }
   po->zero_anonymity_count_estimate =
       GNUNET_MAX (po->current_offset, po->zero_anonymity_count_estimate);
-#if DEBUG_FS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Retrieved block `%s' of type %u for DHT PUT\n", GNUNET_h2s (key),
               type);
-#endif
-  GNUNET_DHT_put (GSF_dht, key, DEFAULT_PUT_REPLICATION, GNUNET_DHT_RO_NONE,
-                  type, size, data, expiration, GNUNET_TIME_UNIT_FOREVER_REL,
+  GNUNET_DHT_put (GSF_dht, key, 5 /* DEFAULT_PUT_REPLICATION */ ,
+                  GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, type, size, data,
+                  expiration, GNUNET_TIME_UNIT_FOREVER_REL,
                   &delay_dht_put_blocks, po);
 }
 
 
 /**
  * Task that is run periodically to obtain blocks for DHT PUTs.
- * 
+ *
  * @param cls type of blocks to gather
  * @param tc scheduler context (unused)
  */