stuff
authorChristian Grothoff <christian@grothoff.org>
Tue, 30 Mar 2010 06:52:25 +0000 (06:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 30 Mar 2010 06:52:25 +0000 (06:52 +0000)
TODO
src/fs/Makefile.am
src/fs/fs.h
src/fs/fs_search.c
src/fs/test_fs_namespace.c

diff --git a/TODO b/TODO
index 20bd3cceb616473e590818ca7d31782ad4a62729..37621af31000c46a9faf2b70a35821751c1362f3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -27,13 +27,10 @@ away), in order in which they will likely be done:
   - utilization can (easily, restart?) go out of control (very large), causing
     content expiration job to go crazy and delete everything!
 * FS:
-  ! fs_search test fails (hangs) since blocktype was changed from "ANY" to "KBLOCK"!
-    (insert blocktype wrong? or what!?)
-  ! fs_namespace test fails (hangs), but local fs service has found results; somehow
-    they are not passed to the client and/or the shutdown sequence is not working
   - gnunet-publish cannot be aborted using CTRL-C
   - on some systems, keyword search does not find locally published content
     (need testcase of command-line tools! - also good to cover getopt API!)
+    [could be related to datastore issue above!]
   - 2-peer download is still too slow (why?)
   - advanced FS API parts
     + search: SBlocks, NBlocks, probes, notify FS-service of known results
index 4a11d4ddfb6f669769ce74eddc9b2e295b07e6c5..a83eef460e4356636fbfaa882c804bd70585a2de 100644 (file)
@@ -134,6 +134,7 @@ TESTS = \
  test_fs_download \
  test_fs_file_information \
  test_fs_list_indexed \
+ test_fs_namespace \
  test_fs_publish \
  test_fs_search \
  test_fs_start_stop \
index b7fab55f07b770be17aa2c86d07fa13b6f2dab6c..e3b3bc99df3715db4e2aa19b41562fa6a2018dce 100644 (file)
@@ -814,6 +814,33 @@ struct GNUNET_FS_SearchContext
    */
   struct GNUNET_FS_SearchContext *parent;
 
+  /**
+   * For update-searches, link to the
+   * first child search that triggered the
+   * update search; otherwise NULL.
+   */
+  struct GNUNET_FS_SearchContext *child_head;
+
+  /**
+   * For update-searches, link to the
+   * last child search that triggered the
+   * update search; otherwise NULL.
+   */
+  struct GNUNET_FS_SearchContext *child_tail;
+
+  /**
+   * For update-searches, link to the
+   * next child belonging to the same parent.
+   */
+  struct GNUNET_FS_SearchContext *next;
+
+  /**
+   * For update-searches, link to the
+   * previous child belonging to the same
+   * parent.
+   */
+  struct GNUNET_FS_SearchContext *prev;
+
   /**
    * Connection to the FS service.
    */
index 3b90338af6fee9f37253402be0200758167fe7b9..98168c3f4c755b0f6a3c5c6282d5ab4bfeb91429 100644 (file)
@@ -812,10 +812,9 @@ search_start (struct GNUNET_FS_Handle *h,
        }
     }
   if (NULL != parent)
-    {
-      // FIXME: need to track children
-      // in parent in case parent is stopped!
-    }
+    GNUNET_CONTAINER_DLL_insert (parent->child_head,
+                                parent->child_tail,
+                                sc);
   pi.status = GNUNET_FS_STATUS_SEARCH_START;
   make_search_status (&pi, sc);
   sc->client_info = h->upcb (h->upcb_cls,
@@ -955,13 +954,18 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
 {
   struct GNUNET_FS_ProgressInfo pi;
   unsigned int i;
+  struct GNUNET_FS_SearchContext *parent;
 
   // FIXME: make un-persistent!
-  if (NULL != sc->parent)
+  if (NULL != (parent = sc->parent))
     {
-      // FIXME: need to untrack sc
-      // in parent!
+      GNUNET_CONTAINER_DLL_remove (parent->child_head,
+                                  parent->child_tail,
+                                  sc);
+      sc->parent = NULL;
     }
+  while (NULL != sc->child_head)
+    GNUNET_FS_search_stop (sc->child_head);
   GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
                                         &search_result_free,
                                         sc);
index 2284f3cef47ac0bc30fe6b6cbeb13dedef4f70c1..a7ccbeccf50955341c8e70f6f3f35cc330cc2e5e 100644 (file)
@@ -23,9 +23,6 @@
  * @brief Test for fs_namespace.c
  * @author Christian Grothoff
  *
- *
- * FIXME:
- * - child search of "sks" search (the "next" identifier) is not stopped => no termination!
  * TODO:
  * - add timeout task
  */
@@ -220,8 +217,6 @@ progress_cb (void *cls,
     case GNUNET_FS_STATUS_SEARCH_STOPPED:
       fprintf (stderr,
               "Search stop event received\n");
-      GNUNET_assert ( (ksk_search == event->value.search.sc) ||
-                     (sks_search == event->value.search.sc));
       return NULL;
     default:
       fprintf (stderr,