diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-01 08:51:43 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-01 08:51:43 +0000 |
commit | 974d4e5d36f0ef1f93f7f881ec21b45ab518bdcc (patch) | |
tree | ea16b7f9dfcf726a5de43fca80637db61bf91684 /src/experimentation | |
parent | e49a562f2dd56775f3d826272fd463493baa2d23 (diff) |
renaming stats and cfg
Diffstat (limited to 'src/experimentation')
6 files changed, 25 insertions, 25 deletions
diff --git a/src/experimentation/gnunet-daemon-experimentation.c b/src/experimentation/gnunet-daemon-experimentation.c index 3a2b71c830..60a515022e 100644 --- a/src/experimentation/gnunet-daemon-experimentation.c +++ b/src/experimentation/gnunet-daemon-experimentation.c @@ -35,13 +35,13 @@ /** * Statistics handle shared between components */ -struct GNUNET_STATISTICS_Handle *GSE_stats; +struct GNUNET_STATISTICS_Handle *GED_stats; /** * Configuration handle shared between components */ -struct GNUNET_CONFIGURATION_Handle *GSE_cfg; +struct GNUNET_CONFIGURATION_Handle *GED_cfg; /** @@ -77,9 +77,9 @@ run (void *cls, char *const *args, const char *cfgfile, { GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting ...\n")); - GSE_cfg = (struct GNUNET_CONFIGURATION_Handle *) cfg; - GSE_stats = GNUNET_STATISTICS_create ("experimentation", cfg); - if (NULL == GSE_stats) + GED_cfg = (struct GNUNET_CONFIGURATION_Handle *) cfg; + GED_stats = GNUNET_STATISTICS_create ("experimentation", cfg); + if (NULL == GED_stats) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to create statistics!\n")); return; diff --git a/src/experimentation/gnunet-daemon-experimentation.h b/src/experimentation/gnunet-daemon-experimentation.h index 9d2c629753..0520054396 100644 --- a/src/experimentation/gnunet-daemon-experimentation.h +++ b/src/experimentation/gnunet-daemon-experimentation.h @@ -49,13 +49,13 @@ /** * Statistics handle shared between components */ -extern struct GNUNET_STATISTICS_Handle *GSE_stats; +extern struct GNUNET_STATISTICS_Handle *GED_stats; /** * Configuration handle shared between components */ -extern struct GNUNET_CONFIGURATION_Handle *GSE_cfg; +extern struct GNUNET_CONFIGURATION_Handle *GED_cfg; /** diff --git a/src/experimentation/gnunet-daemon-experimentation_capabilities.c b/src/experimentation/gnunet-daemon-experimentation_capabilities.c index d2570d387a..a92d2d4bc3 100644 --- a/src/experimentation/gnunet-daemon-experimentation_capabilities.c +++ b/src/experimentation/gnunet-daemon-experimentation_capabilities.c @@ -112,7 +112,7 @@ GED_capabilities_start () /* Plugins configured */ - if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, + if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "TRANSPORT", "PLUGINS", &plugins)) { for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " ")) @@ -139,12 +139,12 @@ GED_capabilities_start () /* IPv6 enabled * FIXE: just having it not enabled is not really sufficient */ - if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg, + if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg, "NAT", "DISABLEV6")) GSE_node_capabilities |= HAVE_IPV6; /* Behind NAT */ - if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg, + if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg, "NAT", "BEHIND_NAT")) GSE_node_capabilities |= BEHIND_NAT; diff --git a/src/experimentation/gnunet-daemon-experimentation_experiments.c b/src/experimentation/gnunet-daemon-experimentation_experiments.c index a39192c575..9e5cfd7e94 100644 --- a/src/experimentation/gnunet-daemon-experimentation_experiments.c +++ b/src/experimentation/gnunet-daemon-experimentation_experiments.c @@ -228,7 +228,7 @@ int GNUNET_EXPERIMENTATION_experiments_add (struct Issuer *i, (long long unsigned int) frequency.rel_value / 1000, (long long unsigned int) duration.rel_value / 1000); GNUNET_CONTAINER_multihashmap_put (experiments, &e->issuer.hashPubKey, e, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); - GNUNET_STATISTICS_set (GSE_stats, "# experiments", GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments", GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO); return GNUNET_OK; } @@ -367,7 +367,7 @@ GED_experiments_start () struct GNUNET_HashCode hash; /* Load valid issuer */ - if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "ISSUERS", &issuers)) + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "ISSUERS", &issuers)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No valid experiment issuers configured! Set value to peer id of issuer! Exit...\n")); return GNUNET_SYSERR; @@ -398,9 +398,9 @@ GED_experiments_start () GED_experiments_stop (); return GNUNET_SYSERR; } - GNUNET_STATISTICS_set (GSE_stats, "# issuer", GNUNET_CONTAINER_multihashmap_size (valid_issuers), GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# issuer", GNUNET_CONTAINER_multihashmap_size (valid_issuers), GNUNET_NO); - if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "PUBKEY", &pubkey)) + if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "PUBKEY", &pubkey)) { if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_key_from_string(pubkey, strlen (pubkey), &pub)) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Invalid public key `%s'\n"), pubkey); @@ -425,7 +425,7 @@ GED_experiments_start () experiments = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); /* Load experiments from file */ - if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "EXPERIMENTS", &file)) + if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "EXPERIMENTS", &file)) return GNUNET_OK; if (GNUNET_YES != GNUNET_DISK_file_test (file)) diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c index f5e2faf4c0..667c9da578 100644 --- a/src/experimentation/gnunet-daemon-experimentation_nodes.c +++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c @@ -71,21 +71,21 @@ struct GNUNET_CONTAINER_MultiHashMap *nodes_inactive; static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) { GNUNET_assert (NULL != m); - GNUNET_assert (NULL != GSE_stats); + GNUNET_assert (NULL != GED_stats); if (m == nodes_active) { - GNUNET_STATISTICS_set (GSE_stats, "# nodes active", + GNUNET_STATISTICS_set (GED_stats, "# nodes active", GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); } else if (m == nodes_inactive) { - GNUNET_STATISTICS_set (GSE_stats, "# nodes inactive", + GNUNET_STATISTICS_set (GED_stats, "# nodes inactive", GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); } else if (m == nodes_requested) { - GNUNET_STATISTICS_set (GSE_stats, "# nodes requested", + GNUNET_STATISTICS_set (GED_stats, "# nodes requested", GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); } else @@ -763,7 +763,7 @@ void GED_nodes_start () { /* Connecting to core service to find partners */ - ch = GNUNET_CORE_connect (GSE_cfg, NULL, + ch = GNUNET_CORE_connect (GED_cfg, NULL, &core_startup_handler, &core_connect_handler, &core_disconnect_handler, diff --git a/src/experimentation/gnunet-daemon-experimentation_scheduler.c b/src/experimentation/gnunet-daemon-experimentation_scheduler.c index 1a3a8cdbbe..aaf47174eb 100644 --- a/src/experimentation/gnunet-daemon-experimentation_scheduler.c +++ b/src/experimentation/gnunet-daemon-experimentation_scheduler.c @@ -93,7 +93,7 @@ request_timeout (void *cls,const struct GNUNET_SCHEDULER_TaskContext* tc) GNUNET_assert (experiments_requested > 0); experiments_requested --; - GNUNET_STATISTICS_set (GSE_stats, "# experiments requested", experiments_requested, GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments requested", experiments_requested, GNUNET_NO); } static void start_experiment (void *cls,const struct GNUNET_SCHEDULER_TaskContext* tc) @@ -127,7 +127,7 @@ static void start_experiment (void *cls,const struct GNUNET_SCHEDULER_TaskContex GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Sending start request to peer `%s' for `%s'\n", GNUNET_i2s (&se->n->id), se->e->name); experiments_requested ++; - GNUNET_STATISTICS_set (GSE_stats, "# experiments requested", experiments_requested, GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments requested", experiments_requested, GNUNET_NO); return; } else if (REQUESTED == se->state) @@ -230,7 +230,7 @@ GED_scheduler_add (struct Node *n, struct Experiment *e) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Added experiment `%s' for node to be scheduled\n", e->name, GNUNET_i2s(&se->n->id)); experiments_scheduled ++; - GNUNET_STATISTICS_set (GSE_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); } /** @@ -266,7 +266,7 @@ GED_scheduler_stop () GNUNET_free (cur); GNUNET_assert (experiments_scheduled > 0); experiments_scheduled --; - GNUNET_STATISTICS_set (GSE_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); } next = running_head; @@ -282,7 +282,7 @@ GED_scheduler_stop () GNUNET_free (cur); GNUNET_assert (experiments_running > 0); experiments_running --; - GNUNET_STATISTICS_set (GSE_stats, "# experiments running", experiments_running, GNUNET_NO); + GNUNET_STATISTICS_set (GED_stats, "# experiments running", experiments_running, GNUNET_NO); } } |