- clean up gns rest api
[oweals/gnunet.git] / src / fs / gnunet-publish.c
index 975f5d2ade557b52b3b788e3f8188cab9a570d68..c353be3012485af34a5ce1754febcf545d23bd83 100644 (file)
@@ -293,15 +293,31 @@ progress_cb (void *cls,
   case GNUNET_FS_STATUS_PUBLISH_STOPPED:
     GNUNET_break (NULL == pc);
     return NULL;
+  case GNUNET_FS_STATUS_UNINDEX_START:
+    FPRINTF (stderr,
+             "%s",
+             _("Starting cleanup after abort\n"));
+    return NULL;
   case GNUNET_FS_STATUS_UNINDEX_PROGRESS:
     return NULL;
   case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
     FPRINTF (stderr,
              "%s",
-             _("Cleanup after abort complete.\n"));
+             _("Cleanup after abort completed.\n"));
+    GNUNET_FS_unindex_stop (info->value.unindex.uc);
+    return NULL;
+  case GNUNET_FS_STATUS_UNINDEX_ERROR:
+    FPRINTF (stderr,
+             "%s",
+             _("Cleanup after abort failed.\n"));
+    GNUNET_FS_unindex_stop (info->value.unindex.uc);
+    return NULL;
+  case GNUNET_FS_STATUS_UNINDEX_STOPPED:
     return NULL;
   default:
-    FPRINTF (stderr, _("Unexpected status: %d\n"), info->status);
+    FPRINTF (stderr,
+             _("Unexpected status: %d\n"),
+             info->status);
     return NULL;
   }
   return "";                    /* non-null */
@@ -316,7 +332,7 @@ progress_cb (void *cls,
  * @param plugin_name name of the plugin that generated the meta data
  * @param type type of the meta data
  * @param format format of data
- * @param data_mime_type mime type of data
+ * @param data_mime_type mime type of @a data
  * @param data value of the meta data
  * @param data_size number of bytes in @a data
  * @return always 0
@@ -334,7 +350,11 @@ meta_printer (void *cls,
     return 0;
   if (EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME == type)
     return 0;
+#if HAVE_LIBEXTRACTOR
   FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data);
+#else
+  FPRINTF (stdout, "\t%d - %s\n", type, data);
+#endif
   return 0;
 }