free active on download error
authorChristian Grothoff <christian@grothoff.org>
Tue, 4 May 2010 15:12:21 +0000 (15:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 4 May 2010 15:12:21 +0000 (15:12 +0000)
TODO
src/fs/fs_download.c
src/fs/fs_search.c
src/fs/fs_tree.c

diff --git a/TODO b/TODO
index d73406e75dc6840cf51ecf5812738b5c4be1fca4..57510234c8c499f752b8ab21a388a22d7a71f634 100644 (file)
--- a/TODO
+++ b/TODO
@@ -74,6 +74,7 @@
 * FS: [CG]
   - datastore reservation (publishing)
   - location URIs (publish, search, download)
+  - unindex on index failure
   - utilize in-line files in meta data always (including in search results or
     when download is triggered manually and for probes); currently the data is
     only used when users do a general 'recursive' download
   - datastore
 * FS:
   - reconstruct IBLOCKS from DBLOCKS if possible (during download; see FIXME in fs_download)
+  - add support for pushing "already seen" search results to FS service for bloomfilter (can wait)
+  - use different 'priority' for probe downloads vs. normal downloads
 
 0.9.0:
 * new webpage:
index 29290756fd1b336c4e607cb2d24539bf4d9cfeb8..c3ab514d96017f88d728667c12b07a9af0b55f2a 100644 (file)
@@ -821,6 +821,24 @@ trigger_recursive_download (void *cls,
 }
 
 
+/**
+ * Free entries in the map.
+ *
+ * @param cls unused (NULL)
+ * @param key unused
+ * @param entry entry of type "struct DownloadRequest" which is freed
+ * @return GNUNET_OK
+ */
+static int
+free_entry (void *cls,
+           const GNUNET_HashCode *key,
+           void *entry)
+{
+  GNUNET_free (entry);
+  return GNUNET_OK;
+}
+
+
 /**
  * Iterator over entries in the pending requests in the 'active' map for the
  * reply that we just got.
@@ -1076,7 +1094,10 @@ process_result_with_request (void *cls,
       dc->th = NULL;
     }
   GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
-  /* FIXME: clean up dc->active / pending! */
+  GNUNET_CONTAINER_multihashmap_iterate (dc->active,
+                                        &free_entry,
+                                        NULL);
+  dc->pending = NULL;
   dc->client = NULL;
   GNUNET_free (sm);
   GNUNET_FS_download_sync_ (dc);
@@ -1386,24 +1407,6 @@ deactivate_fs_download (void *cls)
 }
 
 
-/**
- * Free entries in the map.
- *
- * @param cls unused (NULL)
- * @param key unused
- * @param entry entry of type "struct DownloadRequest" which is freed
- * @return GNUNET_OK
- */
-static int
-free_entry (void *cls,
-           const GNUNET_HashCode *key,
-           void *entry)
-{
-  GNUNET_free (entry);
-  return GNUNET_OK;
-}
-
-
 /**
  * Create SUSPEND event for the given download operation
  * and then clean up our state (without stop signal).
index 6c4224d1e0c4ef7d5bc3aa526bf0cbd83b7c07fb..8c324252ff1f073a02676538a695290ad5bb954f 100644 (file)
@@ -24,7 +24,6 @@
  * @author Christian Grothoff
  *
  * TODO:
- * - centralize code that sprintf's the 'pbuf[32]' strings
  * - add support for pushing "already seen" information
  *   to FS service for bloomfilter (can wait)
  */
index c8cb8bab04755086e50ec09f55cd7c8c370835e3..713594c457e42d4ee286b644ad426dd6e0e88139 100644 (file)
  * @see http://gnunet.org/encoding.php3
  * @author Krista Bennett
  * @author Christian Grothoff
- *
- * TODO:
- * - decide if this API should be made public (gnunet_fs_service.h)
- *   or remain "internal" (but with exported symbols?)
  */
 #include "platform.h"
 #include "fs_tree.h"