diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-17 14:43:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-17 14:43:46 +0000 |
commit | 9eb7267ef8f98dbff65216567c18ff5dee3dac2e (patch) | |
tree | ebc3ca4572f2ecc333e18c00138bc44fa5bf8bae /src | |
parent | 7cded841d917561ea812f858d7dabd11979f0202 (diff) | |
download | gnunet-9eb7267ef8f98dbff65216567c18ff5dee3dac2e.tar.gz gnunet-9eb7267ef8f98dbff65216567c18ff5dee3dac2e.zip |
-fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/Makefile.am | 4 | ||||
-rw-r--r-- | src/gns/gns.conf.in | 4 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns.c | 3 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns_shorten.c | 24 | ||||
-rw-r--r-- | src/gns/test_gns_lookup.conf | 4 | ||||
-rwxr-xr-x | src/gns/test_gns_pseu_shorten.sh | 6 |
6 files changed, 27 insertions, 18 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 9a2573b91..da6da331e 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -206,13 +206,13 @@ libgnunet_plugin_block_gns_la_SOURCES = \ | |||
206 | libgnunet_plugin_block_gns_la_LIBADD = \ | 206 | libgnunet_plugin_block_gns_la_LIBADD = \ |
207 | $(top_builddir)/src/util/libgnunetutil.la \ | 207 | $(top_builddir)/src/util/libgnunetutil.la \ |
208 | $(top_builddir)/src/block/libgnunetblock.la \ | 208 | $(top_builddir)/src/block/libgnunetblock.la \ |
209 | $(top_builddir)/src/namestore/libgnunetnamestore.la | 209 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la |
210 | libgnunet_plugin_block_gns_la_LDFLAGS = \ | 210 | libgnunet_plugin_block_gns_la_LDFLAGS = \ |
211 | $(GN_PLUGIN_LDFLAGS) | 211 | $(GN_PLUGIN_LDFLAGS) |
212 | libgnunet_plugin_block_gns_la_DEPENDENCIES = \ | 212 | libgnunet_plugin_block_gns_la_DEPENDENCIES = \ |
213 | $(top_builddir)/src/util/libgnunetutil.la \ | 213 | $(top_builddir)/src/util/libgnunetutil.la \ |
214 | $(top_builddir)/src/block/libgnunetblock.la \ | 214 | $(top_builddir)/src/block/libgnunetblock.la \ |
215 | $(top_builddir)/src/namestore/libgnunetnamestore.la | 215 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la |
216 | 216 | ||
217 | 217 | ||
218 | check_SCRIPTS = \ | 218 | check_SCRIPTS = \ |
diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in index 4e83a00bf..56276c6c6 100644 --- a/src/gns/gns.conf.in +++ b/src/gns/gns.conf.in | |||
@@ -12,8 +12,8 @@ UNIX_MATCH_UID = NO | |||
12 | # Do we require users that want to access GNS to be in the 'gnunet' group? | 12 | # Do we require users that want to access GNS to be in the 'gnunet' group? |
13 | UNIX_MATCH_GID = YES | 13 | UNIX_MATCH_GID = YES |
14 | 14 | ||
15 | # How many queries is GADS allowed to perform in the background at the same time? | 15 | # How many queries is GNS allowed to perform in the background at the same time? |
16 | MAX_PARALLEL_BACKGROUND_QUERIES = 25 | 16 | MAX_PARALLEL_BACKGROUND_QUERIES = 1000 |
17 | 17 | ||
18 | # How frequently do we try to publish our full zone? | 18 | # How frequently do we try to publish our full zone? |
19 | ZONE_PUBLISH_TIME_WINDOW = 4 h | 19 | ZONE_PUBLISH_TIME_WINDOW = 4 h |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 53d6c11a4..9f3623e8d 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -430,7 +430,6 @@ put_gns_record (void *cls, | |||
430 | GNUNET_GNSRECORD_query_from_private_key (key, | 430 | GNUNET_GNSRECORD_query_from_private_key (key, |
431 | name, | 431 | name, |
432 | &query); | 432 | &query); |
433 | |||
434 | active_put = GNUNET_DHT_put (dht_handle, &query, | 433 | active_put = GNUNET_DHT_put (dht_handle, &query, |
435 | DHT_GNS_REPLICATION_LEVEL, | 434 | DHT_GNS_REPLICATION_LEVEL, |
436 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, | 435 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, |
@@ -463,7 +462,7 @@ publish_zone_dht_start (void *cls, | |||
463 | zone_publish_task = GNUNET_SCHEDULER_NO_TASK; | 462 | zone_publish_task = GNUNET_SCHEDULER_NO_TASK; |
464 | 463 | ||
465 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 464 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
466 | "Scheduling DHT zone update!\n"); | 465 | "Starting DHT zone update!\n"); |
467 | /* start counting again */ | 466 | /* start counting again */ |
468 | num_public_records = 0; | 467 | num_public_records = 0; |
469 | namestore_iter = GNUNET_NAMESTORE_zone_iteration_start (namestore_handle, | 468 | namestore_iter = GNUNET_NAMESTORE_zone_iteration_start (namestore_handle, |
diff --git a/src/gns/gnunet-service-gns_shorten.c b/src/gns/gnunet-service-gns_shorten.c index 2f0bf9644..4e7f9a91d 100644 --- a/src/gns/gnunet-service-gns_shorten.c +++ b/src/gns/gnunet-service-gns_shorten.c | |||
@@ -281,9 +281,9 @@ process_pseu_lookup_ns (void *cls, | |||
281 | gph->namestore_task = NULL; | 281 | gph->namestore_task = NULL; |
282 | if (rd_count > 0) | 282 | if (rd_count > 0) |
283 | { | 283 | { |
284 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 284 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
285 | "Name `%s' already taken, cannot shorten.\n", | 285 | "Name `%s' already taken, cannot shorten.\n", |
286 | gph->current_label); | 286 | gph->current_label); |
287 | /* if this was not yet the original label, try one more | 287 | /* if this was not yet the original label, try one more |
288 | time, this time not using PSEU but the original label */ | 288 | time, this time not using PSEU but the original label */ |
289 | if (0 == strcmp (gph->current_label, | 289 | if (0 == strcmp (gph->current_label, |
@@ -356,7 +356,8 @@ handle_auth_discovery_timeout (void *cls, | |||
356 | 356 | ||
357 | gph->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 357 | gph->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
359 | "DHT lookup for PSEU query timed out.\n"); | 359 | "DHT lookup for PSEU query in zone `%s' timed out.\n", |
360 | GNUNET_GNSRECORD_z2s (&gph->target_zone)); | ||
360 | GNUNET_DHT_get_stop (gph->get_handle); | 361 | GNUNET_DHT_get_stop (gph->get_handle); |
361 | gph->get_handle = NULL; | 362 | gph->get_handle = NULL; |
362 | process_pseu_result (gph, NULL); | 363 | process_pseu_result (gph, NULL); |
@@ -395,7 +396,8 @@ process_auth_records (void *cls, | |||
395 | } | 396 | } |
396 | } | 397 | } |
397 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 398 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
398 | "No PSEU record found in DHT reply.\n"); | 399 | "No PSEU record found in DHT reply with %u records.\n", |
400 | rd_count); | ||
399 | process_pseu_result (gph, NULL); | 401 | process_pseu_result (gph, NULL); |
400 | } | 402 | } |
401 | 403 | ||
@@ -407,11 +409,11 @@ process_auth_records (void *cls, | |||
407 | * @param exp lifetime | 409 | * @param exp lifetime |
408 | * @param key the key the record was stored under | 410 | * @param key the key the record was stored under |
409 | * @param get_path get path | 411 | * @param get_path get path |
410 | * @param get_path_length get path length | 412 | * @param get_path_length @a get_path length |
411 | * @param put_path put path | 413 | * @param put_path put path |
412 | * @param put_path_length put path length | 414 | * @param put_path_length @a put_path length |
413 | * @param type the block type | 415 | * @param type the block type |
414 | * @param size the size of the record | 416 | * @param size number of bytes in @a data |
415 | * @param data the record data | 417 | * @param data the record data |
416 | */ | 418 | */ |
417 | static void | 419 | static void |
@@ -510,6 +512,11 @@ process_zone_to_name_discover (void *cls, | |||
510 | GNUNET_GNSRECORD_query_from_public_key (&gph->target_zone, | 512 | GNUNET_GNSRECORD_query_from_public_key (&gph->target_zone, |
511 | GNUNET_GNS_TLD_PLUS, | 513 | GNUNET_GNS_TLD_PLUS, |
512 | &lookup_key); | 514 | &lookup_key); |
515 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
516 | "Shortening searches in DHT for PSEU record under `%s' in zone `%s'\n", | ||
517 | GNUNET_h2s (&lookup_key), | ||
518 | GNUNET_GNSRECORD_z2s (&gph->target_zone)); | ||
519 | |||
513 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, | 520 | gph->timeout_task = GNUNET_SCHEDULER_add_delayed (DHT_LOOKUP_TIMEOUT, |
514 | &handle_auth_discovery_timeout, | 521 | &handle_auth_discovery_timeout, |
515 | gph); | 522 | gph); |
@@ -540,7 +547,6 @@ GNS_shorten_start (const char *original_label, | |||
540 | { | 547 | { |
541 | struct GetPseuAuthorityHandle *gph; | 548 | struct GetPseuAuthorityHandle *gph; |
542 | 549 | ||
543 | // if (1) return; | ||
544 | if (strlen (original_label) > GNUNET_DNSPARSER_MAX_LABEL_LENGTH) | 550 | if (strlen (original_label) > GNUNET_DNSPARSER_MAX_LABEL_LENGTH) |
545 | { | 551 | { |
546 | GNUNET_break (0); | 552 | GNUNET_break (0); |
diff --git a/src/gns/test_gns_lookup.conf b/src/gns/test_gns_lookup.conf index 5d77e157a..18ebc04c5 100644 --- a/src/gns/test_gns_lookup.conf +++ b/src/gns/test_gns_lookup.conf | |||
@@ -6,13 +6,13 @@ AUTOSTART = YES | |||
6 | PLUGINS = | 6 | PLUGINS = |
7 | 7 | ||
8 | [arm] | 8 | [arm] |
9 | DEFAULTSERVICES = | 9 | DEFAULTSERVICES = |
10 | 10 | ||
11 | [PATHS] | 11 | [PATHS] |
12 | GNUNET_TEST_HOME = /tmp/test-gnunet-gns-peer-1/ | 12 | GNUNET_TEST_HOME = /tmp/test-gnunet-gns-peer-1/ |
13 | 13 | ||
14 | [gns] | 14 | [gns] |
15 | #PREFIX = valgrind --leak-check=full --track-origins=yes | 15 | #PREFIX = valgrind --leak-check=full --track-origins=yes |
16 | AUTOSTART = YES | 16 | AUTOSTART = YES |
17 | AUTO_IMPORT_PKEY = YES | 17 | AUTO_IMPORT_PKEY = YES |
18 | MAX_PARALLEL_BACKGROUND_QUERIES = 10 | 18 | MAX_PARALLEL_BACKGROUND_QUERIES = 10 |
diff --git a/src/gns/test_gns_pseu_shorten.sh b/src/gns/test_gns_pseu_shorten.sh index 8b22438de..b0ae5ebf5 100755 --- a/src/gns/test_gns_pseu_shorten.sh +++ b/src/gns/test_gns_pseu_shorten.sh | |||
@@ -20,11 +20,15 @@ gnunet-namestore -p -z testego -a -n mybestfriendalice -t PKEY -V $DELEGATED_PKE | |||
20 | gnunet-namestore -p -z testego -a -n short -t PKEY -V $SHORT -e never -c test_gns_lookup.conf | 20 | gnunet-namestore -p -z testego -a -n short -t PKEY -V $SHORT -e never -c test_gns_lookup.conf |
21 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 21 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
22 | gnunet-namestore -p -z delegatedego -a -n "+" -t PSEU -V $TEST_PSEU -e never -c test_gns_lookup.conf | 22 | gnunet-namestore -p -z delegatedego -a -n "+" -t PSEU -V $TEST_PSEU -e never -c test_gns_lookup.conf |
23 | # Force start of GNS | ||
24 | gnunet-arm -c test_gns_lookup.conf -i gns | ||
25 | # need to sleep here, to give PSEU record chance to be copied to DHT | ||
26 | sleep 1 | ||
23 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME -t A -c test_gns_lookup.conf` | 27 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME -t A -c test_gns_lookup.conf` |
24 | # need to sleep here, as shortening happens asynchronously... | 28 | # need to sleep here, as shortening happens asynchronously... |
25 | sleep 1 | 29 | sleep 1 |
26 | RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu -t A -c test_gns_lookup.conf` | 30 | RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu -t A -c test_gns_lookup.conf` |
27 | gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf | 31 | gnunet-namestore -z testego -d -n mybestfriendalice -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf |
28 | gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 32 | gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
29 | gnunet-arm -e -c test_gns_lookup.conf | 33 | gnunet-arm -e -c test_gns_lookup.conf |
30 | 34 | ||