fix
[oweals/gnunet.git] / src / fs / test_fs_unindex.c
index 3607144f35388ffeddbc1b7c7ceb90a129156155..21bdc3cb3d1d1f44465246919b4a5120bbc701cf 100644 (file)
@@ -162,7 +162,7 @@ progress_cb (void *cls,
       GNUNET_assert (1 == event->value.publish.anonymity);
       break;
     case GNUNET_FS_STATUS_PUBLISH_STOPPED:
-      GNUNET_assert (publish == event->value.publish.sc);
+      GNUNET_assert (publish == event->value.publish.pc);
       GNUNET_assert (FILESIZE == event->value.publish.size);
       GNUNET_assert (1 == event->value.publish.anonymity);
       GNUNET_FS_stop (fs);
@@ -261,7 +261,8 @@ run (void *cls,
   GNUNET_free (buf);
   meta = GNUNET_CONTAINER_meta_data_create ();
   kuri = GNUNET_FS_uri_ksk_create_from_args (2, keywords);
-  fi = GNUNET_FS_file_information_create_from_file ("publish-context",
+  fi = GNUNET_FS_file_information_create_from_file (fs,
+                                                   "publish-context",
                                                    fn,
                                                    kuri,
                                                    meta,
@@ -309,8 +310,11 @@ main (int argc, char *argv[])
                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-unindex/");
-  GNUNET_DISK_directory_remove (fn);
-  GNUNET_free_non_null (fn);
+  if (NULL != fn)
+    {
+      GNUNET_DISK_directory_remove (fn);
+      GNUNET_free (fn);
+    }
   return 0;
 }