(no commit message)
[oweals/gnunet.git] / src / fs / fs_tree.c
index 15e13be21aec668db410f758b23c13d7c64720da..b38a9c3828e75c665d2ad7366f4abb1f31ca49a0 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
  * @see http://gnunet.org/encoding.php3
  * @author Krista Bennett
  * @author Christian Grothoff
- *
- * TODO:
- * - decide if this API should be made public (gnunet_fs_service.h)
- *   or remain "internal" (but with exported symbols?)
  */
 #include "platform.h"
 #include "fs_tree.h"
@@ -173,7 +169,7 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h,
   struct GNUNET_FS_TreeEncoder *te;
   
   GNUNET_assert (size > 0);
-  te = GNUNET_malloc (sizeof (struct GNUNET_FS_TreeEncoder));
+  te = GNUNET_malloc (sizeof (struct GNUNET_FS_TreeEncoder));  
   te->h = h;
   te->size = size;
   te->cls = cls;
@@ -333,8 +329,7 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te)
                      iob,
                      &te->emsg))
        {
-         GNUNET_SCHEDULER_add_continuation (te->h->sched,
-                                            te->cont,
+         GNUNET_SCHEDULER_add_continuation (te->cont,
                                             te->cls,
                                             GNUNET_SCHEDULER_REASON_TIMEOUT);
          return;
@@ -354,8 +349,7 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te)
       te->uri->type = chk;
       te->uri->data.chk.chk = te->chk_tree[0];
       te->uri->data.chk.file_length = GNUNET_htonll (te->size);
-      GNUNET_SCHEDULER_add_continuation (te->h->sched,
-                                        te->cont,
+      GNUNET_SCHEDULER_add_continuation (te->cont,
                                         te->cls,
                                         GNUNET_SCHEDULER_REASON_PREREQ_DONE);
       return;
@@ -389,8 +383,8 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te)
              &mychk->query,
              te->publish_offset,
              (te->current_depth == te->chk_tree_depth) 
-             ? GNUNET_BLOCK_TYPE_DBLOCK 
-             : GNUNET_BLOCK_TYPE_IBLOCK,
+             ? GNUNET_BLOCK_TYPE_FS_DBLOCK 
+             : GNUNET_BLOCK_TYPE_FS_IBLOCK,
              enc,
              pt_size);
   if (NULL != te->progress)