gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14713 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r14713 - gnunet/src/fs
Date: Fri, 25 Mar 2011 09:06:58 +0100

Author: grothoff
Date: 2011-03-25 09:06:58 +0100 (Fri, 25 Mar 2011)
New Revision: 14713

Modified:
   gnunet/src/fs/gnunet-service-fs.h
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/fs/gnunet-service-fs_indexing.c
   gnunet/src/fs/gnunet-service-fs_indexing.h
   gnunet/src/fs/gnunet-service-fs_lc.c
   gnunet/src/fs/gnunet-service-fs_new.c
   gnunet/src/fs/gnunet-service-fs_pe.c
   gnunet/src/fs/gnunet-service-fs_pr.c
   gnunet/src/fs/test_fs_download_data.conf
Log:
fixes

Modified: gnunet/src/fs/gnunet-service-fs.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs.h   2011-03-25 07:35:15 UTC (rev 14712)
+++ gnunet/src/fs/gnunet-service-fs.h   2011-03-25 08:06:58 UTC (rev 14713)
@@ -33,7 +33,9 @@
 #include "gnunet_block_lib.h"
 #include "fs.h"
 
+#define DEBUG_FS GNUNET_YES
 
+
 /**
  * Should we introduce random latency in processing?  Required for proper
  * implementation of GAP, but can be disabled for performance evaluation of

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2011-03-25 08:06:58 UTC (rev 
14713)
@@ -596,7 +596,7 @@
 #if DEBUG_FS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Transmitting result for query `%s'\n",
-             GNUNET_h2s (key));
+             GNUNET_h2s (&prd->query));
 #endif  
   GNUNET_STATISTICS_update (GSF_stats,
                            gettext_noop ("# replies received for other peers"),
@@ -1636,6 +1636,8 @@
 void
 GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc)
 {
+  if (NULL == cp_map)
+    return; /* already cleaned up */
   GNUNET_CONTAINER_multihashmap_iterate (cp_map,
                                         &clean_local_client,
                                         (void*) lc);

Modified: gnunet/src/fs/gnunet-service-fs_indexing.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_indexing.c  2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_indexing.c  2011-03-25 08:06:58 UTC (rev 
14713)
@@ -31,11 +31,10 @@
 #include "gnunet_protocols.h"
 #include "gnunet_signatures.h"
 #include "gnunet_util_lib.h"
+#include "gnunet-service-fs.h"
 #include "gnunet-service-fs_indexing.h"
 #include "fs.h"
 
-#define DEBUG_FS GNUNET_NO
-
 /**
  * In-memory information about indexed files (also available
  * on-disk).
@@ -681,14 +680,10 @@
 
 
 /**
- * Task run during shutdown.
- *
- * @param cls unused
- * @param tc unused
+ * Shutdown the module.
  */
-static void
-shutdown_task (void *cls,
-              const struct GNUNET_SCHEDULER_TaskContext *tc)
+void
+GNUNET_FS_indexing_done ()
 {
   struct IndexInfo *pos;  
 
@@ -718,9 +713,6 @@
   cfg = c;
   dsh = d;
   ifm = GNUNET_CONTAINER_multihashmap_create (128);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                               &shutdown_task,
-                               NULL);
   read_index_list ();
   return GNUNET_OK;
 }

Modified: gnunet/src/fs/gnunet-service-fs_indexing.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_indexing.h  2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_indexing.h  2011-03-25 08:06:58 UTC (rev 
14713)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -117,4 +117,11 @@
                         struct GNUNET_DATASTORE_Handle *d);
 
 
+/**
+ * Shutdown the module.
+ */
+void
+GNUNET_FS_indexing_done (void);
+
+
 #endif

Modified: gnunet/src/fs/gnunet-service-fs_lc.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_lc.c        2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_lc.c        2011-03-25 08:06:58 UTC (rev 
14713)
@@ -25,6 +25,7 @@
  */
 
 #include "platform.h"
+#include "gnunet-service-fs.h"
 #include "gnunet-service-fs_lc.h"
 #include "gnunet-service-fs_cp.h"
 #include "gnunet-service-fs_pr.h"

Modified: gnunet/src/fs/gnunet-service-fs_new.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_new.c       2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_new.c       2011-03-25 08:06:58 UTC (rev 
14713)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -28,8 +28,8 @@
  * - GSF_plan_size_ (?)
  * - GSF_plan_notify_request_done (!)
  * - consider re-issue GSF_dht_lookup_ after non-DHT reply received 
+ * - implement 'SUPPORT_DELAYS'
  *
- *
  */
 #include "platform.h"
 #include <float.h>
@@ -53,8 +53,6 @@
 #include "gnunet-service-fs_put.h"
 #include "fs.h"
 
-#define DEBUG_FS GNUNET_YES
-
 /**
  * Size for the hash map for DHT requests from the FS
  * service.  Should be about the number of concurrent
@@ -416,6 +414,7 @@
       GNUNET_SCHEDULER_cancel (cover_age_task);
       cover_age_task = GNUNET_SCHEDULER_NO_TASK;
     }
+  GNUNET_FS_indexing_done ();
   GNUNET_LOAD_value_free (datastore_get_load);
   datastore_get_load = NULL;
   GNUNET_LOAD_value_free (GSF_rt_entry_lifetime);

Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c        2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_pe.c        2011-03-25 08:06:58 UTC (rev 
14713)
@@ -24,6 +24,7 @@
  * @author Christian Grothoff
  */
 #include "platform.h"
+#include "gnunet-service-fs.h"
 #include "gnunet-service-fs_cp.h"
 #include "gnunet-service-fs_pe.h"
 #include "gnunet-service-fs_pr.h"

Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c        2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/gnunet-service-fs_pr.c        2011-03-25 08:06:58 UTC (rev 
14713)
@@ -25,6 +25,7 @@
  */
 #include "platform.h"
 #include "gnunet_load_lib.h"
+#include "gnunet-service-fs.h"
 #include "gnunet-service-fs_cp.h"
 #include "gnunet-service-fs_indexing.h"
 #include "gnunet-service-fs_pr.h"
@@ -861,7 +862,7 @@
 #if DEBUG_FS
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Replicating result for query `%s' with priority %u\n",
-                 GNUNET_h2s (&query),
+                 GNUNET_h2s (key),
                  prq.priority);
 #endif
       start = GNUNET_malloc (sizeof (struct GNUNET_TIME_Absolute));

Modified: gnunet/src/fs/test_fs_download_data.conf
===================================================================
--- gnunet/src/fs/test_fs_download_data.conf    2011-03-25 07:35:15 UTC (rev 
14712)
+++ gnunet/src/fs/test_fs_download_data.conf    2011-03-25 08:06:58 UTC (rev 
14713)
@@ -37,7 +37,7 @@
 PORT = 42471
 HOSTNAME = localhost
 ACTIVEMIGRATION = NO
-DEBUG = NO
+DEBUG = YES
 #PREFIX = valgrind --tool=memcheck --leak-check=yes
 #BINARY = /home/grothoff/bin/gnunet-service-fs
 




reply via email to

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