[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3762 - GNUnet/src/applications/datastore
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3762 - GNUnet/src/applications/datastore |
Date: |
Mon, 13 Nov 2006 20:53:09 -0800 (PST) |
Author: grothoff
Date: 2006-11-13 20:53:08 -0800 (Mon, 13 Nov 2006)
New Revision: 3762
Modified:
GNUnet/src/applications/datastore/datastore.c
Log:
add quota stat
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2006-11-14 04:47:14 UTC
(rev 3761)
+++ GNUnet/src/applications/datastore/datastore.c 2006-11-14 04:53:08 UTC
(rev 3762)
@@ -33,6 +33,7 @@
#include "gnunet_datastore_service.h"
#include "gnunet_sqstore_service.h"
#include "gnunet_state_service.h"
+#include "gnunet_stats_service.h"
#include "filter.h"
#include "prefetch.h"
@@ -340,6 +341,7 @@
unsigned long long lquota;
unsigned int sqot;
State_ServiceAPI * state;
+ Stats_ServiceAPI * stats;
if (-1 == GC_get_configuration_value_number(capi->cfg,
"FS",
@@ -351,9 +353,14 @@
GE_BREAK(capi->ectx, 0);
return NULL; /* OOPS */
}
-
quota
= lquota * 1024 * 1024; /* MB to bytes */
+ stats = capi->requestService("stats");
+ if (stats != NULL) {
+ stats->set(stats->create(gettext_noop("# bytes allowed for datastore")),
+ quota);
+ capi->releaseService(stats);
+ }
state = capi->requestService("state");
if (state != NULL) {
sqot = htonl(lquota);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3762 - GNUnet/src/applications/datastore,
grothoff <=