API fix
authorChristian Grothoff <christian@grothoff.org>
Sun, 25 Oct 2009 19:33:17 +0000 (19:33 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 25 Oct 2009 19:33:17 +0000 (19:33 +0000)
src/fs/fs_unindex.c
src/fs/gnunet-unindex.c
src/fs/test_fs_unindex.c
src/include/gnunet_fs_service.h

index 0374e1db2b3628e18498f07986ff2dc3489670f0..10faf4cf9dc2d91f00c5bfe7d931402cec041b89 100644 (file)
@@ -390,11 +390,13 @@ process_hash (void *cls,
  *
  * @param h handle to the file sharing subsystem
  * @param filename file to unindex
+ * @param cctx initial value for the client context
  * @return NULL on error, otherwise handle 
  */
 struct GNUNET_FS_UnindexContext *
 GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
-                        const char *filename)
+                        const char *filename,
+                        void *cctx)
 {
   struct GNUNET_FS_UnindexContext *ret;
   struct GNUNET_FS_ProgressInfo pi;
@@ -410,6 +412,7 @@ GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
   ret->filename = GNUNET_strdup (filename);
   ret->start_time = GNUNET_TIME_absolute_get ();
   ret->file_size = size;
+  ret->client_info = cctx;
 
   // FIXME: make persistent!
   pi.status = GNUNET_FS_STATUS_UNINDEX_START;
index c6b75c9c308f60f297484623cf40c60804a50370..bc87e59f9b7df8039708f44e29e9de346bfad399 100644 (file)
@@ -139,7 +139,8 @@ run (void *cls,
       return;
     }
   uc = GNUNET_FS_unindex_start (ctx,
-                               args[0]);
+                               args[0],
+                               NULL);
   if (NULL == uc)
     {
       fprintf (stderr,
index 3cff008e63f83db4c716a7d259aaf464e050ec09..0b7173115dd7ea378148c26a266262c6cacf81af 100644 (file)
@@ -114,7 +114,8 @@ progress_cb (void *cls,
              (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
       start = GNUNET_TIME_absolute_get ();
       unindex = GNUNET_FS_unindex_start (fs,
-                                        fn);
+                                        fn,
+                                        "unindex");
       GNUNET_assert (unindex != NULL);
       break;
     case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
index 0bed010d9e469eff6ecf77c3a7ea36b145dcb2c5..6ce4b6d11ef1ef0d8800332c54d26102ba0ece68 100644 (file)
@@ -2012,12 +2012,13 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
  *
  * @param h handle to the file sharing subsystem
  * @param filename file to unindex
+ * @param cctx initial value for the client context
  * @return NULL on error, otherwise handle 
  */
-// FIXME: add a "void *" context for the client to arguments!?
 struct GNUNET_FS_UnindexContext *
 GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
-                        const char *filename);
+                        const char *filename,
+                        void *cctx);
 
 
 /**