-whitespace
[oweals/gnunet.git] / src / fs / fs_api.c
index 04057bc9881575e0584e1918f179a46ba9312778..88d82158e309fb49951451ce6c7b789dcef05ec8 100644 (file)
@@ -284,7 +284,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "AD: %u, MP: %u; %d probes and %d downloads to start, will run again in %s\n",
              h->active_downloads,
-             h->max_parallel_requests, 
+             h->max_parallel_requests,
              num_probes_change,
              num_downloads_change,
              GNUNET_STRINGS_relative_time_to_string (restart_at, GNUNET_YES));
@@ -797,7 +797,7 @@ write_start_time (struct GNUNET_BIO_WriteHandle *wh,
  *
  * @param rh handle for reading
  * @param timestamp where to write the deserialized timestamp
- * @return GNUNET_OK on success
+ * @return #GNUNET_OK on success
  */
 static int
 read_start_time (struct GNUNET_BIO_ReadHandle *rh,
@@ -982,6 +982,8 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, const char *fn,
   case 4:                      /* directory */
     ret->is_directory = GNUNET_YES;
     if ((GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dsize)) ||
+        (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.dir.contents_completed)) ||
+        (GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.dir.contents_size)) ||
         (NULL == (ret->data.dir.dir_data = GNUNET_malloc_large (dsize))) ||
         (GNUNET_OK !=
          GNUNET_BIO_read (rh, "dir-data", ret->data.dir.dir_data, dsize)) ||
@@ -1335,6 +1337,8 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
         (NULL == fi->data.dir.entries->serialization) )
       GNUNET_FS_file_information_sync_ (fi->data.dir.entries);
     if ((GNUNET_OK != GNUNET_BIO_write_int32 (wh, fi->data.dir.dir_size)) ||
+        (GNUNET_OK != GNUNET_BIO_write_int64 (wh, fi->data.dir.contents_completed)) ||
+        (GNUNET_OK != GNUNET_BIO_write_int64 (wh, fi->data.dir.contents_size)) ||
         (GNUNET_OK !=
          GNUNET_BIO_write (wh, fi->data.dir.dir_data,
                            (uint32_t) fi->data.dir.dir_size)) ||
@@ -1477,7 +1481,7 @@ deserialize_publish_file (void *cls, const char *filename)
   int32_t all_done;
   int32_t have_ns;
   char *fi_root;
-  struct GNUNET_CRYPTO_EccPrivateKey ns;
+  struct GNUNET_CRYPTO_EcdsaPrivateKey ns;
   char *fi_pos;
   char *emsg;
 
@@ -1522,7 +1526,7 @@ deserialize_publish_file (void *cls, const char *filename)
   }
   if (GNUNET_YES == have_ns)
   {
-    pc->ns = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey);
+    pc->ns = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
     *pc->ns = ns;
   }
   if ((0 == (pc->options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY)) &&
@@ -1637,7 +1641,7 @@ GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc)
       ( (NULL != pc->ns) &&
        (GNUNET_OK != GNUNET_BIO_write (wh,
                                        pc->ns,
-                                       sizeof (struct GNUNET_CRYPTO_EccPrivateKey)) ) ))
+                                       sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)) ) ))
   {
     GNUNET_break (0);
     goto cleanup;