aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs/fs_unindex.c5
-rw-r--r--src/fs/gnunet-unindex.c3
-rw-r--r--src/fs/test_fs_unindex.c3
-rw-r--r--src/include/gnunet_fs_service.h5
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,
390 * 390 *
391 * @param h handle to the file sharing subsystem 391 * @param h handle to the file sharing subsystem
392 * @param filename file to unindex 392 * @param filename file to unindex
393 * @param cctx initial value for the client context
393 * @return NULL on error, otherwise handle 394 * @return NULL on error, otherwise handle
394 */ 395 */
395struct GNUNET_FS_UnindexContext * 396struct GNUNET_FS_UnindexContext *
396GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, 397GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
397 const char *filename) 398 const char *filename,
399 void *cctx)
398{ 400{
399 struct GNUNET_FS_UnindexContext *ret; 401 struct GNUNET_FS_UnindexContext *ret;
400 struct GNUNET_FS_ProgressInfo pi; 402 struct GNUNET_FS_ProgressInfo pi;
@@ -410,6 +412,7 @@ GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
410 ret->filename = GNUNET_strdup (filename); 412 ret->filename = GNUNET_strdup (filename);
411 ret->start_time = GNUNET_TIME_absolute_get (); 413 ret->start_time = GNUNET_TIME_absolute_get ();
412 ret->file_size = size; 414 ret->file_size = size;
415 ret->client_info = cctx;
413 416
414 // FIXME: make persistent! 417 // FIXME: make persistent!
415 pi.status = GNUNET_FS_STATUS_UNINDEX_START; 418 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,
139 return; 139 return;
140 } 140 }
141 uc = GNUNET_FS_unindex_start (ctx, 141 uc = GNUNET_FS_unindex_start (ctx,
142 args[0]); 142 args[0],
143 NULL);
143 if (NULL == uc) 144 if (NULL == uc)
144 { 145 {
145 fprintf (stderr, 146 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,
114 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); 114 (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
115 start = GNUNET_TIME_absolute_get (); 115 start = GNUNET_TIME_absolute_get ();
116 unindex = GNUNET_FS_unindex_start (fs, 116 unindex = GNUNET_FS_unindex_start (fs,
117 fn); 117 fn,
118 "unindex");
118 GNUNET_assert (unindex != NULL); 119 GNUNET_assert (unindex != NULL);
119 break; 120 break;
120 case GNUNET_FS_STATUS_UNINDEX_COMPLETED: 121 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,
2012 * 2012 *
2013 * @param h handle to the file sharing subsystem 2013 * @param h handle to the file sharing subsystem
2014 * @param filename file to unindex 2014 * @param filename file to unindex
2015 * @param cctx initial value for the client context
2015 * @return NULL on error, otherwise handle 2016 * @return NULL on error, otherwise handle
2016 */ 2017 */
2017// FIXME: add a "void *" context for the client to arguments!?
2018struct GNUNET_FS_UnindexContext * 2018struct GNUNET_FS_UnindexContext *
2019GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, 2019GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
2020 const char *filename); 2020 const char *filename,
2021 void *cctx);
2021 2022
2022 2023
2023/** 2024/**