gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1975 - in GNUnet: . src/applications/sqstore_sqlite


From: durner
Subject: [GNUnet-SVN] r1975 - in GNUnet: . src/applications/sqstore_sqlite
Date: Sat, 27 Aug 2005 15:50:43 -0700 (PDT)

Author: durner
Date: 2005-08-27 15:50:38 -0700 (Sat, 27 Aug 2005)
New Revision: 1975

Modified:
   GNUnet/src/applications/sqstore_sqlite/sqlite.c
   GNUnet/todo
Log:
up

Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c     2005-08-27 22:35:53 UTC 
(rev 1974)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c     2005-08-27 22:50:38 UTC 
(rev 1975)
@@ -31,6 +31,7 @@
 #include "gnunet_util.h"
 #include "gnunet_sqstore_service.h"
 #include "gnunet_protocols.h"
+#include "gnunet_stats_service.h"
 #include <sqlite3.h>
 
 #define DEBUG_SQLITE NO
@@ -49,6 +50,9 @@
  */
 #define LOG_SQLITE(level, cmd) do { LOG(level, _("`%s' failed at %s:%d with 
error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(dbh->dbf)); } while(0);
 
+static Stats_ServiceAPI * stats;
+static CoreAPIForApplication * coreAPI;
+static unsigned int stat_size;
 
 /**
  * @brief SQLite wrapper
@@ -112,6 +116,8 @@
 
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
   ret = dbh->payload;
+  if (stats)
+    stats->change(stat_size, ret);
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
   return ret;
 }
@@ -950,6 +956,12 @@
 
   MUTEX_CREATE(&dbh->DATABASE_Lock_);
 
+  coreAPI = capi;
+  stats = coreAPI->requestService("stats");
+  if (stats)
+    stat_size
+      = stats->create(gettext_noop("# bytes in datastore"));
+
   api.getSize = &getSize;
   api.put = &put;
   api.get = &get;

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2005-08-27 22:35:53 UTC (rev 1974)
+++ GNUnet/todo 2005-08-27 22:50:38 UTC (rev 1975)
@@ -14,9 +14,8 @@
 0.7.0 [30.8.2005?] (aka "compatibility? what's that?"):
 - Missing Features:
   * gnunet-gtk namespace stuff (#911)  [ Christian, RC! ]
-  * improve renaming/moving of downloaded files [ Nils, RC! ]
 - investigate: 
-  * quota code for sqstores: is space estimate correct? [ Christian, RC ]
+  * quota code for sqstores: is space estimate correct? [ Nils, RC ]
   * gap:2061 BREAK (bad route)  [ Christian, non-RC ]
   * failed setkey exchanges, connection timeouts [ Christian, non-RC ]
 
@@ -24,7 +23,6 @@
 - known bugs:
   * gnunet-setup memory leaks (#878)
 - testing:
-  * on Windows 98 [Nils]
   * more "make check" targets to test: 
     + gnunet-tracekit
     + gap and economy





reply via email to

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