From 0d0099a21d8aa7fec086b78b31b1a3c729877645 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Tue, 3 Jul 2012 14:40:35 +0000 Subject: [PATCH] -ADVERTISED_PORT updated with value of PORT if present and not present in TESTING_IGNORE_KEYS --- src/testing/testing.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/testing/testing.c b/src/testing/testing.c index 87c432fb1..60b0ac070 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -652,6 +652,23 @@ update_config_sections (void *cls, } if (0 != ikeys_cnt) { + for (key = 0; key < ikeys_cnt; key++) + { + if (NULL != strstr (ikeys[key], "ADVERTISED_PORT")) + break; + } + if ((key == ikeys_cnt) && + (GNUNET_YES == GNUNET_CONFIGURATION_have_value (uc->cfg, section, + "ADVERTISED_PORT"))) + { + if (GNUNET_OK == + GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "PORT", &ptr)) + { + GNUNET_CONFIGURATION_set_value_string (uc->cfg, section, + "ADVERTISED_PORT", ptr); + GNUNET_free (ptr); + } + } for (key = 0; key < ikeys_cnt; key++) { if (NULL != strstr (ikeys[key], "ACCEPT_FROM")) @@ -664,10 +681,6 @@ update_config_sections (void *cls, GNUNET_free (ikeys); } GNUNET_free_non_null (val); - - /* if (NULL != strstr (section, "transport-")) */ - /* return; */ - if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "ACCEPT_FROM", &orig_allowed_hosts)) -- 2.25.1