From 013778533273494f054ec1aa6084fe72d9d1e1c7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Oct 2009 19:33:17 +0000 Subject: [PATCH] API fix --- src/fs/fs_unindex.c | 5 ++++- src/fs/gnunet-unindex.c | 3 ++- src/fs/test_fs_unindex.c | 3 ++- src/include/gnunet_fs_service.h | 5 +++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 0374e1db2..10faf4cf9 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c @@ -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; diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index c6b75c9c3..bc87e59f9 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c @@ -139,7 +139,8 @@ run (void *cls, return; } uc = GNUNET_FS_unindex_start (ctx, - args[0]); + args[0], + NULL); if (NULL == uc) { fprintf (stderr, diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c index 3cff008e6..0b7173115 100644 --- a/src/fs/test_fs_unindex.c +++ b/src/fs/test_fs_unindex.c @@ -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: diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 0bed010d9..6ce4b6d11 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -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); /** -- 2.25.1