gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5066 - GNUnet/src/applications/fs/module


From: gnunet
Subject: [GNUnet-SVN] r5066 - GNUnet/src/applications/fs/module
Date: Fri, 15 Jun 2007 16:58:16 -0600 (MDT)

Author: grothoff
Date: 2007-06-15 16:58:16 -0600 (Fri, 15 Jun 2007)
New Revision: 5066

Modified:
   GNUnet/src/applications/fs/module/querymanager.c
Log:
fix statistic

Modified: GNUnet/src/applications/fs/module/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/module/querymanager.c    2007-06-15 22:57:58 UTC 
(rev 5065)
+++ GNUnet/src/applications/fs/module/querymanager.c    2007-06-15 22:58:16 UTC 
(rev 5066)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004, 2005, 2006 Christian Grothoff (and other 
contributing authors)
+     (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -72,7 +72,7 @@
   GE_ASSERT(ectx, off < trackerCount);
   FREE(trackers[off]);
   if (stats != NULL)
-    stats->change(stat_queries_tracked, 1);
+    stats->change(stat_queries_tracked, -1);
   trackers[off] = trackers[--trackerCount];
   trackers[trackerCount] = NULL;
   if ( (trackerSize > 64) &&
@@ -233,16 +233,20 @@
 
 void doneQueryManager() {
   int i;
+
+  for (i=trackerCount-1;i>=0;i--) 
+    FREE(trackers[i]);
+  
+  GROW(trackers,
+       trackerSize,
+       0); 
+  trackerCount = 0;
   if (stats != NULL) {
+    stats->set(stat_queries_tracked, 0);
     coreAPI->releaseService(stats);
     stats = NULL;
   }
-  for (i=trackerCount-1;i>=0;i--)
-    FREE(trackers[i]);
-  GROW(trackers,
-       trackerSize,
-       0);
-  trackerCount = 0;
+
   coreAPI->unregisterClientExitHandler(&ceh);
   MUTEX_DESTROY(queryManagerLock);
   coreAPI = NULL;





reply via email to

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