[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22446 - gnunet/src/testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22446 - gnunet/src/testing |
Date: |
Mon, 2 Jul 2012 23:39:16 +0200 |
Author: harsha
Date: 2012-07-02 23:39:16 +0200 (Mon, 02 Jul 2012)
New Revision: 22446
Modified:
gnunet/src/testing/test_testing_defaults.conf
gnunet/src/testing/test_testing_portreservation.c
gnunet/src/testing/testing.c
Log:
added TESTING_IGNORE_KEYS
Modified: gnunet/src/testing/test_testing_defaults.conf
===================================================================
--- gnunet/src/testing/test_testing_defaults.conf 2012-07-02 18:40:58 UTC
(rev 22445)
+++ gnunet/src/testing/test_testing_defaults.conf 2012-07-02 21:39:16 UTC
(rev 22446)
@@ -9,6 +9,9 @@
PORT = 2565
PLUGINS = tcp
+[transport-tcp]
+TESTING_IGNORE_KEYS = SOMETHING;KEY1;ACCEPT_FROM;
+
[arm]
PORT = 2566
DEFAULTSERVICES =
Modified: gnunet/src/testing/test_testing_portreservation.c
===================================================================
--- gnunet/src/testing/test_testing_portreservation.c 2012-07-02 18:40:58 UTC
(rev 22445)
+++ gnunet/src/testing/test_testing_portreservation.c 2012-07-02 21:39:16 UTC
(rev 22446)
@@ -66,7 +66,7 @@
GNUNET_assert (old_port1 == new_port1);
GNUNET_TESTING_release_port (system, GNUNET_YES, new_port1);
GNUNET_TESTING_release_port (system, GNUNET_YES, new_port2);
- GNUNET_TESTING_system_destroy (system, GNUNET_NO);
+ GNUNET_TESTING_system_destroy (system, GNUNET_YES);
}
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2012-07-02 18:40:58 UTC (rev 22445)
+++ gnunet/src/testing/testing.c 2012-07-02 21:39:16 UTC (rev 22446)
@@ -614,12 +614,59 @@
update_config_sections (void *cls,
const char *section)
{
- struct UpdateContext *uc = cls;
+ struct UpdateContext *uc = cls;
+ char **ikeys;
+ char *val;
+ char *ptr;
char *orig_allowed_hosts;
char *allowed_hosts;
+ uint16_t ikeys_cnt;
+ uint16_t key;
+
+ ikeys_cnt = 0;
+ val = NULL;
+ if (GNUNET_YES == GNUNET_CONFIGURATION_have_value (uc->cfg, section,
+ "TESTING_IGNORE_KEYS"))
+ {
+ GNUNET_assert
+ (GNUNET_YES ==
+ GNUNET_CONFIGURATION_get_value_string (uc->cfg, section,
+ "TESTING_IGNORE_KEYS", &val));
+ ptr = val;
+ for (ikeys_cnt = 0; NULL != (ptr = strstr (ptr, ";")); ikeys_cnt++)
+ ptr++;
+ if (0 == ikeys_cnt)
+ GNUNET_break (0);
+ else
+ {
+ ikeys = GNUNET_malloc ((sizeof (char *)) * ikeys_cnt);
+ ptr = val;
+ for (key = 0; key < ikeys_cnt; key++)
+ {
+ ikeys[key] = ptr;
+ ptr = strstr (ptr, ";");
+ *ptr = '\0';
+ ptr++;
+ }
+ }
+ }
+ if (0 != ikeys_cnt)
+ {
+ for (key = 0; key < ikeys_cnt; key++)
+ {
+ if (NULL != strstr (ikeys[key], "ACCEPT_FROM"))
+ {
+ GNUNET_free (ikeys);
+ GNUNET_free (val);
+ return;
+ }
+ }
+ GNUNET_free (ikeys);
+ }
+ GNUNET_free_non_null (val);
- if (NULL != strstr (section, "transport-"))
- return;
+ /* if (NULL != strstr (section, "transport-")) */
+ /* return; */
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (uc->cfg, section, "ACCEPT_FROM",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22446 - gnunet/src/testing,
gnunet <=