diff options
author | Maximilian Szengel <gnunet@maxsz.de> | 2012-10-20 10:39:33 +0000 |
---|---|---|
committer | Maximilian Szengel <gnunet@maxsz.de> | 2012-10-20 10:39:33 +0000 |
commit | fec48540241c2476f96a89f2be431f5a2330babd (patch) | |
tree | e8f2f9b91d7c88fe9f523bdefed3cb16fdd28b81 /src | |
parent | 2d428fd66f0b9aef8182f3fc16471280902f7383 (diff) | |
download | gnunet-fec48540241c2476f96a89f2be431f5a2330babd.tar.gz gnunet-fec48540241c2476f96a89f2be431f5a2330babd.zip |
Updated regex profiler config with mesh and dht default arm services
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-regex-profiler.c | 16 | ||||
-rw-r--r-- | src/mesh/regex_profiler_test.conf | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/mesh/gnunet-regex-profiler.c b/src/mesh/gnunet-regex-profiler.c index 6d2f5934a..dd5de1785 100644 --- a/src/mesh/gnunet-regex-profiler.c +++ b/src/mesh/gnunet-regex-profiler.c | |||
@@ -257,6 +257,11 @@ static char *search_string = "GNUNETVPN0001000IPEX4110010011001111001101000"; | |||
257 | */ | 257 | */ |
258 | static GNUNET_SCHEDULER_TaskIdentifier search_task; | 258 | static GNUNET_SCHEDULER_TaskIdentifier search_task; |
259 | 259 | ||
260 | /** | ||
261 | * Search timeout task identifier. | ||
262 | */ | ||
263 | static GNUNET_SCHEDULER_TaskIdentifier search_timeout_task; | ||
264 | |||
260 | 265 | ||
261 | /** | 266 | /** |
262 | * Shutdown nicely | 267 | * Shutdown nicely |
@@ -400,6 +405,8 @@ mesh_peer_connect_handler (void *cls, | |||
400 | { | 405 | { |
401 | // struct Peer *peer = (struct Peer *)cls; | 406 | // struct Peer *peer = (struct Peer *)cls; |
402 | 407 | ||
408 | GNUNET_SCHEDULER_cancel (search_timeout_task); | ||
409 | |||
403 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Mesh peer connect handler.\n"); | 410 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Mesh peer connect handler.\n"); |
404 | printf ("\nString successfully matched\n"); | 411 | printf ("\nString successfully matched\n"); |
405 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 412 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
@@ -446,9 +453,9 @@ do_connect_by_string (void *cls, | |||
446 | GNUNET_MESH_peer_request_connect_by_string (peers[0].mesh_tunnel_handle, | 453 | GNUNET_MESH_peer_request_connect_by_string (peers[0].mesh_tunnel_handle, |
447 | search_string); | 454 | search_string); |
448 | 455 | ||
449 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 456 | search_timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
450 | (GNUNET_TIME_UNIT_SECONDS, 30), | 457 | (GNUNET_TIME_UNIT_SECONDS, 30), |
451 | &do_connect_by_string_timeout, (void *)(long)30); | 458 | &do_connect_by_string_timeout, (void *)(long)30); |
452 | } | 459 | } |
453 | 460 | ||
454 | 461 | ||
@@ -489,7 +496,6 @@ mesh_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
489 | { | 496 | { |
490 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 497 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
491 | "Could not find policy file %s\n", peer->policy_file); | 498 | "Could not find policy file %s\n", peer->policy_file); |
492 | GNUNET_TESTBED_operation_done (peer->op_handle); | ||
493 | return; | 499 | return; |
494 | } | 500 | } |
495 | if (GNUNET_OK != GNUNET_DISK_file_size (peer->policy_file, &filesize, GNUNET_YES, GNUNET_YES)) | 501 | if (GNUNET_OK != GNUNET_DISK_file_size (peer->policy_file, &filesize, GNUNET_YES, GNUNET_YES)) |
@@ -497,7 +503,6 @@ mesh_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
497 | if (0 == filesize) | 503 | if (0 == filesize) |
498 | { | 504 | { |
499 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Policy file %s is empty.\n", peer->policy_file); | 505 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Policy file %s is empty.\n", peer->policy_file); |
500 | GNUNET_TESTBED_operation_done (peer->op_handle); | ||
501 | return; | 506 | return; |
502 | } | 507 | } |
503 | data = GNUNET_malloc (filesize); | 508 | data = GNUNET_malloc (filesize); |
@@ -506,7 +511,6 @@ mesh_connect_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
506 | GNUNET_free (data); | 511 | GNUNET_free (data); |
507 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not read policy file %s.\n", | 512 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Could not read policy file %s.\n", |
508 | peer->policy_file); | 513 | peer->policy_file); |
509 | GNUNET_TESTBED_operation_done (peer->op_handle); | ||
510 | return; | 514 | return; |
511 | } | 515 | } |
512 | buf = data; | 516 | buf = data; |
diff --git a/src/mesh/regex_profiler_test.conf b/src/mesh/regex_profiler_test.conf index 1c59eff6d..97fce9265 100644 --- a/src/mesh/regex_profiler_test.conf +++ b/src/mesh/regex_profiler_test.conf | |||
@@ -5,7 +5,6 @@ ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; | |||
5 | HOSTNAME = localhost | 5 | HOSTNAME = localhost |
6 | MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 5 | 6 | MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 5 |
7 | MAX_PARALLEL_OVERLAY_CONNECT_OPERATIONS = 5 | 7 | MAX_PARALLEL_OVERLAY_CONNECT_OPERATIONS = 5 |
8 | #PREFIX = xterm -geometry 100x85 -T peer1 -e libtool --mode=execute gdb --args | ||
9 | 8 | ||
10 | [fs] | 9 | [fs] |
11 | AUTOSTART = NO | 10 | AUTOSTART = NO |
@@ -15,6 +14,9 @@ AUTOSTART = NO | |||
15 | 14 | ||
16 | [mesh] | 15 | [mesh] |
17 | AUTOSTART = NO | 16 | AUTOSTART = NO |
17 | APP_ANNOUNCE_TIME = 4 s | ||
18 | ID_ANNOUNCE_TIME = 4 s | ||
19 | CONNECT_TIMEOUT = 30 s | ||
18 | 20 | ||
19 | [dht] | 21 | [dht] |
20 | AUTOSTART = NO | 22 | AUTOSTART = NO |
@@ -43,7 +45,7 @@ PORT = 12092 | |||
43 | AUTOSTART = YES | 45 | AUTOSTART = YES |
44 | 46 | ||
45 | [arm] | 47 | [arm] |
46 | DEFAULTSERVICES = core | 48 | DEFAULTSERVICES = core mesh dht |
47 | PORT = 12366 | 49 | PORT = 12366 |
48 | DEBUG = NO | 50 | DEBUG = NO |
49 | 51 | ||