diff options
| author | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-03 14:40:35 +0000 |
|---|---|---|
| committer | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-03 14:40:35 +0000 |
| commit | 62629c2db0efdbdb8d2cba23279186452cf4d2bb (patch) | |
| tree | a01f1d51e9a4315aac5246e07952241f02445ee5 /src/testing | |
| parent | 91bbf53c16dbfcbd347b7c4018c08e9220c01e65 (diff) | |
-ADVERTISED_PORT updated with value of PORT if present and not present in TESTING_IGNORE_KEYS
git-svn-id: https://gnunet.org/svn/gnunet@22462 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/testing.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index 87c432fb14..60b0ac0707 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -654,6 +654,23 @@ update_config_sections (void *cls, { 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")) { GNUNET_free (ikeys); @@ -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)) |
