diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-03 14:40:35 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-03 14:40:35 +0000 |
commit | 0d0099a21d8aa7fec086b78b31b1a3c729877645 (patch) | |
tree | a01f1d51e9a4315aac5246e07952241f02445ee5 /src/testing | |
parent | 50869782ff2eb667bf028fc5da069999b4ee863a (diff) | |
download | gnunet-0d0099a21d8aa7fec086b78b31b1a3c729877645.tar.gz gnunet-0d0099a21d8aa7fec086b78b31b1a3c729877645.zip |
-ADVERTISED_PORT updated with value of PORT if present and not present in TESTING_IGNORE_KEYS
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 87c432fb1..60b0ac070 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -654,6 +654,23 @@ update_config_sections (void *cls, | |||
654 | { | 654 | { |
655 | for (key = 0; key < ikeys_cnt; key++) | 655 | for (key = 0; key < ikeys_cnt; key++) |
656 | { | 656 | { |
657 | if (NULL != strstr (ikeys[key], "ADVERTISED_PORT")) | ||
658 | break; | ||
659 | } | ||
660 | if ((key == ikeys_cnt) && | ||
661 | (GNUNET_YES == GNUNET_CONFIGURATION_have_value (uc->cfg, section, | ||
662 | "ADVERTISED_PORT"))) | ||
663 | { | ||
664 | if (GNUNET_OK == | ||
665 | GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "PORT", &ptr)) | ||
666 | { | ||
667 | GNUNET_CONFIGURATION_set_value_string (uc->cfg, section, | ||
668 | "ADVERTISED_PORT", ptr); | ||
669 | GNUNET_free (ptr); | ||
670 | } | ||
671 | } | ||
672 | for (key = 0; key < ikeys_cnt; key++) | ||
673 | { | ||
657 | if (NULL != strstr (ikeys[key], "ACCEPT_FROM")) | 674 | if (NULL != strstr (ikeys[key], "ACCEPT_FROM")) |
658 | { | 675 | { |
659 | GNUNET_free (ikeys); | 676 | GNUNET_free (ikeys); |
@@ -664,10 +681,6 @@ update_config_sections (void *cls, | |||
664 | GNUNET_free (ikeys); | 681 | GNUNET_free (ikeys); |
665 | } | 682 | } |
666 | GNUNET_free_non_null (val); | 683 | GNUNET_free_non_null (val); |
667 | |||
668 | /* if (NULL != strstr (section, "transport-")) */ | ||
669 | /* return; */ | ||
670 | |||
671 | if (GNUNET_OK != | 684 | if (GNUNET_OK != |
672 | GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "ACCEPT_FROM", | 685 | GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "ACCEPT_FROM", |
673 | &orig_allowed_hosts)) | 686 | &orig_allowed_hosts)) |