-only trigger check config if we actually need it
[oweals/gnunet.git] / src / fs / fs_publish.c
index f29722fee00d247871defdc4e2277b0893400df6..89cc2714c99bed46885ce5ac9d10449bf5b21e6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2010 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file fs/fs_publish.c
@@ -143,8 +143,6 @@ ds_put_cont (void *cls,
     }
     return;
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-              "SOME DONE!\n");
   pc->any_done = GNUNET_YES;
   GNUNET_assert (NULL == pc->upload_task);
   pc->upload_task =
@@ -268,7 +266,6 @@ publish_sblocks_cont (void *cls,
   {
     pc->qre =
         GNUNET_DATASTORE_release_reserve (pc->dsh, pc->rid, UINT_MAX, UINT_MAX,
-                                          GNUNET_TIME_UNIT_FOREVER_REL,
                                           &finish_release_reserve, pc);
   }
   else
@@ -415,11 +412,9 @@ block_reader (void *cls,
  * the final result.
  *
  * @param cls our publishing context
- * @param tc scheduler's task context (not used)
  */
 static void
-encode_cont (void *cls,
-             const struct GNUNET_SCHEDULER_TaskContext *tc)
+encode_cont (void *cls)
 {
   struct GNUNET_FS_PublishContext *pc = cls;
   struct GNUNET_FS_FileInformation *p;
@@ -512,8 +507,9 @@ block_proc (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Indexing block `%s' for offset %llu with index size %u\n",
-                GNUNET_h2s (&chk->query), (unsigned long long) offset,
-                sizeof (struct OnDemandBlock));
+                GNUNET_h2s (&chk->query),
+                (unsigned long long) offset,
+                (unsigned int) sizeof (struct OnDemandBlock));
     odb.offset = GNUNET_htonll (offset);
     odb.file_id = p->data.file.file_id;
     GNUNET_assert (pc->qre == NULL);
@@ -529,7 +525,6 @@ block_proc (void *cls,
                               p->bo.replication_level,
                               p->bo.expiration_time,
                               -2, 1,
-                              GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                               &ds_put_cont, pc);
     return;
   }
@@ -550,7 +545,6 @@ block_proc (void *cls,
                             p->bo.replication_level,
                             p->bo.expiration_time,
                             -2, 1,
-                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                             &ds_put_cont,
                             pc);
 }
@@ -962,11 +956,9 @@ create_loc_uri (struct GNUNET_FS_PublishContext *pc)
  * Main function that performs the upload.
  *
  * @param cls `struct GNUNET_FS_PublishContext *` identifies the upload
- * @param tc task context
  */
 void
-GNUNET_FS_publish_main_ (void *cls,
-                         const struct GNUNET_SCHEDULER_TaskContext *tc)
+GNUNET_FS_publish_main_ (void *cls)
 {
   struct GNUNET_FS_PublishContext *pc = cls;
   struct GNUNET_FS_ProgressInfo pi;