plane hacking
[oweals/gnunet.git] / src / fs / gnunet-service-fs_indexing.c
index b72c53fc0b053dbaa20c1db248d6e1c4a34d5433..99b5da1026bd3fa8074898eb9fd0150a1e0dcf1a 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
@@ -36,7 +36,6 @@
 #include "gnunet_protocols.h"
 #include "gnunet_signatures.h"
 #include "gnunet_util_lib.h"
-#include "gnunet-service-fs_drq.h"
 #include "gnunet-service-fs_indexing.h"
 #include "fs.h"
 
@@ -215,7 +214,8 @@ read_index_list ()
           GNUNET_BIO_read_string (rh, 
                                   "Name of indexed file",
                                   &fname,
-                                  1024 * 16)) )
+                                  1024 * 16)) &&
+         (fname != NULL) )
     {
       slen = strlen (fname) + 1;
       pos = GNUNET_malloc (sizeof (struct IndexInfo) + slen);
@@ -342,9 +342,9 @@ GNUNET_FS_handle_index_start (void *cls,
   uint16_t msize;
   struct IndexInfo *ii;
   size_t slen;
-  uint32_t dev;
+  uint64_t dev;
   uint64_t ino;
-  uint32_t mydev;
+  uint64_t mydev;
   uint64_t myino;
 
   msize = ntohs(message->size);
@@ -364,7 +364,7 @@ GNUNET_FS_handle_index_start (void *cls,
                                  GNUNET_SYSERR);
       return;
     }
-  dev = ntohl (ism->device);
+  dev = GNUNET_ntohll (ism->device);
   ino = GNUNET_ntohll (ism->inode);
   ism = (const struct IndexStartMessage*) message;
   slen = strlen (fn) + 1;
@@ -682,7 +682,7 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
        key,
        nsize,
        edata,
-       GNUNET_BLOCK_TYPE_DBLOCK,
+       GNUNET_BLOCK_TYPE_FS_DBLOCK,
        priority,
        anonymity,
        expiration,