gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10713 - in gnunet: . src/fs


From: gnunet
Subject: [GNUnet-SVN] r10713 - in gnunet: . src/fs
Date: Tue, 30 Mar 2010 08:52:25 +0200

Author: grothoff
Date: 2010-03-30 08:52:25 +0200 (Tue, 30 Mar 2010)
New Revision: 10713

Modified:
   gnunet/TODO
   gnunet/src/fs/Makefile.am
   gnunet/src/fs/fs.h
   gnunet/src/fs/fs_search.c
   gnunet/src/fs/test_fs_namespace.c
Log:
stuff

Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2010-03-29 17:51:49 UTC (rev 10712)
+++ gnunet/TODO 2010-03-30 06:52:25 UTC (rev 10713)
@@ -27,13 +27,10 @@
   - 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

Modified: gnunet/src/fs/Makefile.am
===================================================================
--- gnunet/src/fs/Makefile.am   2010-03-29 17:51:49 UTC (rev 10712)
+++ gnunet/src/fs/Makefile.am   2010-03-30 06:52:25 UTC (rev 10713)
@@ -134,6 +134,7 @@
  test_fs_download \
  test_fs_file_information \
  test_fs_list_indexed \
+ test_fs_namespace \
  test_fs_publish \
  test_fs_search \
  test_fs_start_stop \

Modified: gnunet/src/fs/fs.h
===================================================================
--- gnunet/src/fs/fs.h  2010-03-29 17:51:49 UTC (rev 10712)
+++ gnunet/src/fs/fs.h  2010-03-30 06:52:25 UTC (rev 10713)
@@ -815,6 +815,33 @@
   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.
    */
   struct GNUNET_CLIENT_Connection *client;

Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c   2010-03-29 17:51:49 UTC (rev 10712)
+++ gnunet/src/fs/fs_search.c   2010-03-30 06:52:25 UTC (rev 10713)
@@ -812,10 +812,9 @@
        }
     }
   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 @@
 {
   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);

Modified: gnunet/src/fs/test_fs_namespace.c
===================================================================
--- gnunet/src/fs/test_fs_namespace.c   2010-03-29 17:51:49 UTC (rev 10712)
+++ gnunet/src/fs/test_fs_namespace.c   2010-03-30 06:52:25 UTC (rev 10713)
@@ -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 @@
     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,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]