From 1911cc508e10a4052499ba41e565edf57184daf7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 3 Nov 2011 21:20:07 +0000 Subject: [PATCH] use new quota parsing capabilities -- SVN 1875 --- src/datacache/datacache.c | 2 +- src/datacache/perf_datacache_data_mysql.conf | 2 +- src/datacache/perf_datacache_data_postgres.conf | 2 +- src/datacache/perf_datacache_data_sqlite.conf | 2 +- src/datacache/test_datacache_data_mysql.conf | 2 +- src/datacache/test_datacache_data_postgres.conf | 2 +- src/datacache/test_datacache_data_sqlite.conf | 2 +- src/datastore/datastore.conf | 2 +- src/datastore/gnunet-service-datastore.c | 2 +- src/datastore/test_datastore_api_data_mysql.conf | 2 +- src/datastore/test_datastore_api_data_postgres.conf | 2 +- src/datastore/test_datastore_api_data_sqlite.conf | 2 +- src/datastore/test_defaults.conf | 2 +- src/dht/dht.conf | 2 +- src/dht/test_dht_api_peer1.conf | 2 +- src/dht/test_dht_multipeer_data.conf | 2 +- src/dht/test_dht_twopeer_data.conf | 2 +- src/fs/fs_test_lib_data.conf | 2 +- src/fs/test_fs_defaults.conf | 2 +- src/mesh/test_mesh.conf | 2 +- src/mesh/test_mesh_path.conf | 2 +- src/vpn/test-conf.conf | 4 ++-- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c index 7c92f7737..324ab78ef 100644 --- a/src/datacache/datacache.c +++ b/src/datacache/datacache.c @@ -139,7 +139,7 @@ GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg, char *name; if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, section, "QUOTA", "a)) + GNUNET_CONFIGURATION_get_value_size (cfg, section, "QUOTA", "a)) { LOG (GNUNET_ERROR_TYPE_ERROR, _("No `%s' specified for `%s' in configuration!\n"), "QUOTA", section); diff --git a/src/datacache/perf_datacache_data_mysql.conf b/src/datacache/perf_datacache_data_mysql.conf index 255006925..1760f7d08 100644 --- a/src/datacache/perf_datacache_data_mysql.conf +++ b/src/datacache/perf_datacache_data_mysql.conf @@ -1,5 +1,5 @@ [perfcache] -QUOTA = 500000 +QUOTA = 500 KB DATABASE = mysql [datacache-mysql] diff --git a/src/datacache/perf_datacache_data_postgres.conf b/src/datacache/perf_datacache_data_postgres.conf index 9626933a3..c92f52a04 100644 --- a/src/datacache/perf_datacache_data_postgres.conf +++ b/src/datacache/perf_datacache_data_postgres.conf @@ -1,5 +1,5 @@ [perfcache] -QUOTA = 500000 +QUOTA = 500 KB DATABASE = postgres [datacache-postgres] diff --git a/src/datacache/perf_datacache_data_sqlite.conf b/src/datacache/perf_datacache_data_sqlite.conf index b81034f5f..9d0dbbdba 100644 --- a/src/datacache/perf_datacache_data_sqlite.conf +++ b/src/datacache/perf_datacache_data_sqlite.conf @@ -1,4 +1,4 @@ [perfcache] -QUOTA = 500000 +QUOTA = 500 KB DATABASE = sqlite diff --git a/src/datacache/test_datacache_data_mysql.conf b/src/datacache/test_datacache_data_mysql.conf index de84b4ca7..bc9daa3ad 100644 --- a/src/datacache/test_datacache_data_mysql.conf +++ b/src/datacache/test_datacache_data_mysql.conf @@ -1,5 +1,5 @@ [testcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = mysql [datacache-mysql] diff --git a/src/datacache/test_datacache_data_postgres.conf b/src/datacache/test_datacache_data_postgres.conf index 5452ea817..09e8e7253 100644 --- a/src/datacache/test_datacache_data_postgres.conf +++ b/src/datacache/test_datacache_data_postgres.conf @@ -1,6 +1,6 @@ [testcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = postgres [datacache-postgres] diff --git a/src/datacache/test_datacache_data_sqlite.conf b/src/datacache/test_datacache_data_sqlite.conf index 8254e483a..bf6ce1b2b 100644 --- a/src/datacache/test_datacache_data_sqlite.conf +++ b/src/datacache/test_datacache_data_sqlite.conf @@ -1,5 +1,5 @@ [testcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite diff --git a/src/datastore/datastore.conf b/src/datastore/datastore.conf index ed44036c7..e86c75bb6 100644 --- a/src/datastore/datastore.conf +++ b/src/datastore/datastore.conf @@ -10,7 +10,7 @@ CONFIG = $DEFAULTCONFIG BINARY = gnunet-service-datastore ACCEPT_FROM = 127.0.0.1; ACCEPT_FROM6 = ::1; -QUOTA = 100000000 +QUOTA = 100 MB BLOOMFILTER = $SERVICEHOME/fs/bloomfilter DATABASE = sqlite # DISABLE_SOCKET_FORWARDING = NO diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index 71379d5db..be88d288e 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -1480,7 +1480,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, cfg = c; if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, "DATASTORE", "QUOTA", "a)) + GNUNET_CONFIGURATION_get_value_size (cfg, "DATASTORE", "QUOTA", "a)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No `%s' specified for `%s' in configuration!\n"), "QUOTA", diff --git a/src/datastore/test_datastore_api_data_mysql.conf b/src/datastore/test_datastore_api_data_mysql.conf index 3dc17c3af..8e5a3dc0d 100644 --- a/src/datastore/test_datastore_api_data_mysql.conf +++ b/src/datastore/test_datastore_api_data_mysql.conf @@ -17,7 +17,7 @@ PORT = 22667 PORT = 42464 [datastore] -QUOTA = 10000000 +QUOTA = 10 MB DATABASE = mysql [datastore-mysql] diff --git a/src/datastore/test_datastore_api_data_postgres.conf b/src/datastore/test_datastore_api_data_postgres.conf index c806ab5be..046c561f4 100644 --- a/src/datastore/test_datastore_api_data_postgres.conf +++ b/src/datastore/test_datastore_api_data_postgres.conf @@ -17,7 +17,7 @@ PORT = 22667 PORT = 42464 [datastore] -QUOTA = 10000000 +QUOTA = 10 MB DATABASE = postgres [datastore-postgres] diff --git a/src/datastore/test_datastore_api_data_sqlite.conf b/src/datastore/test_datastore_api_data_sqlite.conf index eaf4f2b5c..098f9d2b6 100644 --- a/src/datastore/test_datastore_api_data_sqlite.conf +++ b/src/datastore/test_datastore_api_data_sqlite.conf @@ -17,7 +17,7 @@ PORT = 22667 PORT = 42464 [datastore] -QUOTA = 10000000 +QUOTA = 10 MB [fs] AUTOSTART = NO diff --git a/src/datastore/test_defaults.conf b/src/datastore/test_defaults.conf index e2911fc2d..bbc1ad190 100644 --- a/src/datastore/test_defaults.conf +++ b/src/datastore/test_defaults.conf @@ -1,6 +1,6 @@ [datastore] PORT = 22654 -QUOTA = 1000000 +QUOTA = 1 MB [dht] AUTOSTART = NO diff --git a/src/dht/dht.conf b/src/dht/dht.conf index 50c25daac..ba903a2d0 100644 --- a/src/dht/dht.conf +++ b/src/dht/dht.conf @@ -34,5 +34,5 @@ UNIX_MATCH_GID = YES [dhtcache] DATABASE = sqlite -QUOTA = 1024000 +QUOTA = 1 MB diff --git a/src/dht/test_dht_api_peer1.conf b/src/dht/test_dht_api_peer1.conf index 090a7e507..6bd5a8920 100644 --- a/src/dht/test_dht_api_peer1.conf +++ b/src/dht/test_dht_api_peer1.conf @@ -17,7 +17,7 @@ BINARY = gnunet-service-dht plugins = dht test [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [transport] diff --git a/src/dht/test_dht_multipeer_data.conf b/src/dht/test_dht_multipeer_data.conf index 3e5d2c756..9268153d7 100644 --- a/src/dht/test_dht_multipeer_data.conf +++ b/src/dht/test_dht_multipeer_data.conf @@ -27,7 +27,7 @@ CONVERGE_MODIFIER = 4 plugins = test dht [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [transport] diff --git a/src/dht/test_dht_twopeer_data.conf b/src/dht/test_dht_twopeer_data.conf index 93cf0fa42..0cb0f18ab 100644 --- a/src/dht/test_dht_twopeer_data.conf +++ b/src/dht/test_dht_twopeer_data.conf @@ -16,7 +16,7 @@ BINARY = gnunet-service-dht plugins = test dht dns [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [transport] diff --git a/src/fs/fs_test_lib_data.conf b/src/fs/fs_test_lib_data.conf index 6b2f02ee6..957dc6859 100644 --- a/src/fs/fs_test_lib_data.conf +++ b/src/fs/fs_test_lib_data.conf @@ -7,5 +7,5 @@ TOTAL_QUOTA_IN = 3932160 TOTAL_QUOTA_OUT = 3932160 [datastore] -QUOTA = 2000000000 +QUOTA = 2 GB diff --git a/src/fs/test_fs_defaults.conf b/src/fs/test_fs_defaults.conf index f71a12061..a2b111181 100644 --- a/src/fs/test_fs_defaults.conf +++ b/src/fs/test_fs_defaults.conf @@ -28,7 +28,7 @@ HOSTNAME = localhost DEFAULTSERVICES = fs [datastore] -QUOTA = 100000000 +QUOTA = 100 MB [statistics] PORT = 43467 diff --git a/src/mesh/test_mesh.conf b/src/mesh/test_mesh.conf index c6a6dff2e..b619591b8 100644 --- a/src/mesh/test_mesh.conf +++ b/src/mesh/test_mesh.conf @@ -25,7 +25,7 @@ PORT = 2100 plugins = dht test [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [transport] diff --git a/src/mesh/test_mesh_path.conf b/src/mesh/test_mesh_path.conf index c6a6dff2e..b619591b8 100644 --- a/src/mesh/test_mesh_path.conf +++ b/src/mesh/test_mesh_path.conf @@ -25,7 +25,7 @@ PORT = 2100 plugins = dht test [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [transport] diff --git a/src/vpn/test-conf.conf b/src/vpn/test-conf.conf index 39446b53c..2b6186b2d 100644 --- a/src/vpn/test-conf.conf +++ b/src/vpn/test-conf.conf @@ -49,7 +49,7 @@ UNIXPATH = /tmp/gnunet-service-dht.sock # PREFIX = [dhtcache] -QUOTA = 1000000 +QUOTA = 1 MB DATABASE = sqlite [arm] @@ -217,7 +217,7 @@ CONFIG = $DEFAULTCONFIG BINARY = gnunet-service-datastore ACCEPT_FROM = 127.0.0.1; ACCEPT_FROM6 = ::1; -QUOTA = 100000000 +QUOTA = 100 MB BLOOMFILTER = $SERVICEHOME/fs/bloomfilter DATABASE = sqlite -- 2.25.1