-use GPLv3+ consistently
[oweals/gnunet.git] / src / fs / test_fs_download.c
index a62cf23a0a6860c3835cee7070190a6cfab12c65..c069875cfb082322fc8f761630ca92af7383657f 100644 (file)
@@ -142,18 +142,18 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     fprintf (stdout,
             "Publishing complete, %llu kb/s.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     GAUGER ("FS", 
            (GNUNET_YES == indexed) 
            ? "Publishing speed (indexing)"
             : "Publishing speed (insertion)",
-           (unsigned long long) (FILESIZE * 1000LL /
+           (unsigned long long) (FILESIZE * 1000000LL /
                                  (1 +
                                   GNUNET_TIME_absolute_get_duration
-                                  (start).rel_value) / 1024LL), "kb/s");
+                                  (start).rel_value_us) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
@@ -168,18 +168,18 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     fprintf (stdout,
             "Download complete,  %llu kb/s.\n",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL));
+                                   (start).rel_value_us) / 1024LL));
     GAUGER ("FS",
            (GNUNET_YES == indexed) 
            ? "Local download speed (indexed)"  
            : "Local download speed (inserted)",
-            (unsigned long long) (FILESIZE * 1000LL /
+            (unsigned long long) (FILESIZE * 1000000LL /
                                   (1 +
                                    GNUNET_TIME_absolute_get_duration
-                                   (start).rel_value) / 1024LL), "kb/s");
+                                   (start).rel_value_us) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -329,10 +329,10 @@ main (int argc, char *argv[])
     binary_name = "test-fs-download-indexed";
     config_name = "test_fs_download_indexed.conf";
   }
-  if (NULL != strstr (argv[0], "stream"))
+  if (NULL != strstr (argv[0], "mesh"))
   {
-    binary_name = "test-fs-download-stream";
-    config_name = "test_fs_download_stream.conf";
+    binary_name = "test-fs-download-mesh";
+    config_name = "test_fs_download_mesh.conf";
   }
   if (0 != GNUNET_TESTING_peer_run (binary_name,
                                    config_name,