diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-12-27 14:06:10 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-12-27 14:26:55 +0100 |
commit | 111cae2400240d06ba454de7744e115cdc82b15c (patch) | |
tree | f4b813e8bf36f86aa505448e2ae903d2ffe92e6d /src/testbed | |
parent | 4b7c77defca52fee200add9ee1a4b84e4ae46b55 (diff) | |
download | gnunet-111cae2400240d06ba454de7744e115cdc82b15c.tar.gz gnunet-111cae2400240d06ba454de7744e115cdc82b15c.zip |
unset environment variables that will break testbed, indentation and comment typo fixes
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-daemon-testbed-underlay.c | 6 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_oc.c | 15 | ||||
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 15 |
3 files changed, 22 insertions, 14 deletions
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c index 0b6c44710..3605e0384 100644 --- a/src/testbed/gnunet-daemon-testbed-underlay.c +++ b/src/testbed/gnunet-daemon-testbed-underlay.c | |||
@@ -165,7 +165,8 @@ check_access (void *cls, const struct GNUNET_PeerIdentity * pid) | |||
165 | 165 | ||
166 | 166 | ||
167 | static int | 167 | static int |
168 | get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id) | 168 | get_identity (unsigned int offset, |
169 | struct GNUNET_PeerIdentity *id) | ||
169 | { | 170 | { |
170 | struct GNUNET_CRYPTO_EddsaPrivateKey private_key; | 171 | struct GNUNET_CRYPTO_EddsaPrivateKey private_key; |
171 | 172 | ||
@@ -174,7 +175,8 @@ get_identity (unsigned int offset, struct GNUNET_PeerIdentity *id) | |||
174 | GNUNET_memcpy (&private_key, | 175 | GNUNET_memcpy (&private_key, |
175 | hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE), | 176 | hostkeys_data + (offset * GNUNET_TESTING_HOSTKEYFILESIZE), |
176 | GNUNET_TESTING_HOSTKEYFILESIZE); | 177 | GNUNET_TESTING_HOSTKEYFILESIZE); |
177 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, &id->public_key); | 178 | GNUNET_CRYPTO_eddsa_key_get_public (&private_key, |
179 | &id->public_key); | ||
178 | return GNUNET_OK; | 180 | return GNUNET_OK; |
179 | } | 181 | } |
180 | 182 | ||
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 09849797c..11c45a0f5 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -261,7 +261,7 @@ struct OverlayConnectContext | |||
261 | enum OverlayConnectContextType type; | 261 | enum OverlayConnectContextType type; |
262 | 262 | ||
263 | /** | 263 | /** |
264 | * The id of the second peer which is has to connect to the first peer | 264 | * The id of the second peer which has to connect to the first peer |
265 | */ | 265 | */ |
266 | uint32_t other_peer_id; | 266 | uint32_t other_peer_id; |
267 | }; | 267 | }; |
@@ -930,10 +930,10 @@ send_hello (void *cls) | |||
930 | other_peer_str); | 930 | other_peer_str); |
931 | GNUNET_free (other_peer_str); | 931 | GNUNET_free (other_peer_str); |
932 | lp2c->ohh = | 932 | lp2c->ohh = |
933 | GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg, | 933 | GNUNET_TRANSPORT_offer_hello (lp2c->tcc.cfg, |
934 | occ->hello, | 934 | occ->hello, |
935 | &occ_hello_sent_cb, | 935 | &occ_hello_sent_cb, |
936 | occ); | 936 | occ); |
937 | if (NULL == lp2c->ohh) | 937 | if (NULL == lp2c->ohh) |
938 | { | 938 | { |
939 | GNUNET_break (0); | 939 | GNUNET_break (0); |
@@ -1001,6 +1001,11 @@ p2_transport_connect (struct OverlayConnectContext *occ) | |||
1001 | { | 1001 | { |
1002 | struct Peer *peer2; | 1002 | struct Peer *peer2; |
1003 | 1003 | ||
1004 | /* HUH? Why to *obtain* HELLO? Seems we use this to *SEND* the | ||
1005 | HELLO! */ | ||
1006 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1007 | "Connecting to transport of peer %s to obtain HELLO\n", | ||
1008 | GNUNET_i2s (&occ->other_peer_identity)); | ||
1004 | GNUNET_assert (NULL == occ->emsg); | 1009 | GNUNET_assert (NULL == occ->emsg); |
1005 | GNUNET_assert (NULL != occ->hello); | 1010 | GNUNET_assert (NULL != occ->hello); |
1006 | GNUNET_assert (NULL == occ->ghh); | 1011 | GNUNET_assert (NULL == occ->ghh); |
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 9829bbf0d..0fa6d8172 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -175,9 +175,7 @@ controller_event_cb (void *cls, | |||
175 | { | 175 | { |
176 | printf ("\nAborting due to very high failure rate\n"); | 176 | printf ("\nAborting due to very high failure rate\n"); |
177 | print_overlay_links_summary (); | 177 | print_overlay_links_summary (); |
178 | if (NULL != abort_task) | 178 | GNUNET_SCHEDULER_shutdown (); |
179 | GNUNET_SCHEDULER_cancel (abort_task); | ||
180 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); | ||
181 | return; | 179 | return; |
182 | } | 180 | } |
183 | } | 181 | } |
@@ -260,11 +258,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
260 | event_mask = 0; | 258 | event_mask = 0; |
261 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); | 259 | event_mask |= (1LL << GNUNET_TESTBED_ET_CONNECT); |
262 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); | 260 | event_mask |= (1LL << GNUNET_TESTBED_ET_OPERATION_FINISHED); |
263 | GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask, controller_event_cb, | 261 | GNUNET_TESTBED_run (hosts_file, cfg, num_peers, event_mask, |
264 | NULL, &test_run, NULL); | 262 | &controller_event_cb, NULL, |
263 | &test_run, NULL); | ||
265 | abort_task = | 264 | abort_task = |
266 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_abort, | 265 | GNUNET_SCHEDULER_add_shutdown (&do_abort, |
267 | NULL); | 266 | NULL); |
268 | } | 267 | } |
269 | 268 | ||
270 | 269 | ||
@@ -310,6 +309,8 @@ main (int argc, char *const *argv) | |||
310 | const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS]"; | 309 | const char *binaryHelp = "gnunet-testbed-profiler [OPTIONS]"; |
311 | int ret; | 310 | int ret; |
312 | 311 | ||
312 | unsetenv ("XDG_DATA_HOME"); | ||
313 | unsetenv ("XDG_CONFIG_HOME"); | ||
313 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 314 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
314 | return 2; | 315 | return 2; |
315 | result = GNUNET_SYSERR; | 316 | result = GNUNET_SYSERR; |