aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-18 14:09:55 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-18 14:09:55 +0000
commit200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7 (patch)
treef89388586fbf00a3b7c985b2b28bb74abda3a364 /src/statistics
parent640ae593fd34d27034f994a2e945a8942f1a4d5d (diff)
downloadgnunet-200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7.tar.gz
gnunet-200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7.zip
localization
of scopes
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/gnunet-service-statistics.c16
-rw-r--r--src/statistics/gnunet-statistics.c29
2 files changed, 17 insertions, 28 deletions
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c
index 428ce932f..efc6ce128 100644
--- a/src/statistics/gnunet-service-statistics.c
+++ b/src/statistics/gnunet-service-statistics.c
@@ -420,17 +420,6 @@ handle_set (void *cls,
420 420
421 421
422/** 422/**
423 * List of handlers for the messages understood by this
424 * service.
425 */
426static struct GNUNET_SERVER_MessageHandler handlers[] = {
427 {&handle_set, NULL, GNUNET_MESSAGE_TYPE_STATISTICS_SET, 0},
428 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_STATISTICS_GET, 0},
429 {NULL, NULL, 0, 0}
430};
431
432
433/**
434 * Task run during shutdown. 423 * Task run during shutdown.
435 * 424 *
436 * @param cls unused 425 * @param cls unused
@@ -458,6 +447,11 @@ run (void *cls,
458 struct GNUNET_SERVER_Handle *server, 447 struct GNUNET_SERVER_Handle *server,
459 const struct GNUNET_CONFIGURATION_Handle *c) 448 const struct GNUNET_CONFIGURATION_Handle *c)
460{ 449{
450 static const struct GNUNET_SERVER_MessageHandler handlers[] = {
451 {&handle_set, NULL, GNUNET_MESSAGE_TYPE_STATISTICS_SET, 0},
452 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_STATISTICS_GET, 0},
453 {NULL, NULL, 0, 0}
454 };
461 cfg = c; 455 cfg = c;
462 GNUNET_SERVER_add_handlers (server, handlers); 456 GNUNET_SERVER_add_handlers (server, handlers);
463 load (server); 457 load (server);
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index 4fc8d8435..159a7548d 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -150,23 +150,6 @@ run (void *cls,
150} 150}
151 151
152/** 152/**
153 * gnunet-statistics command line options
154 */
155static struct GNUNET_GETOPT_CommandLineOption options[] = {
156 {'n', "name", "NAME",
157 gettext_noop ("limit output to statistcs for the given NAME"), 1,
158 &GNUNET_GETOPT_set_string, &name},
159 {'p', "persistent", NULL,
160 gettext_noop ("make the value being set persistent"), 0,
161 &GNUNET_GETOPT_set_one, &persistent},
162 {'s', "subsystem", "SUBSYSTEM",
163 gettext_noop ("limit output to the given SUBSYSTEM"), 1,
164 &GNUNET_GETOPT_set_string, &subsystem},
165 GNUNET_GETOPT_OPTION_END
166};
167
168
169/**
170 * The main function to obtain statistics in GNUnet. 153 * The main function to obtain statistics in GNUnet.
171 * 154 *
172 * @param argc number of arguments from the command line 155 * @param argc number of arguments from the command line
@@ -176,6 +159,18 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = {
176int 159int
177main (int argc, char *const *argv) 160main (int argc, char *const *argv)
178{ 161{
162 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
163 {'n', "name", "NAME",
164 gettext_noop ("limit output to statistcs for the given NAME"), 1,
165 &GNUNET_GETOPT_set_string, &name},
166 {'p', "persistent", NULL,
167 gettext_noop ("make the value being set persistent"), 0,
168 &GNUNET_GETOPT_set_one, &persistent},
169 {'s', "subsystem", "SUBSYSTEM",
170 gettext_noop ("limit output to the given SUBSYSTEM"), 1,
171 &GNUNET_GETOPT_set_string, &subsystem},
172 GNUNET_GETOPT_OPTION_END
173 };
179 return (GNUNET_OK == 174 return (GNUNET_OK ==
180 GNUNET_PROGRAM_run (argc, 175 GNUNET_PROGRAM_run (argc,
181 argv, 176 argv,