diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-24 08:28:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-24 08:28:19 +0000 |
commit | 6c33a3bbe11a98b306b42854812d8af6662b892e (patch) | |
tree | 8882ce9a28d1217de7466bc3ebda0de28e47b5ff | |
parent | 6817ec26a3d87926add681d37685214fc3370541 (diff) | |
download | gnunet-6c33a3bbe11a98b306b42854812d8af6662b892e.tar.gz gnunet-6c33a3bbe11a98b306b42854812d8af6662b892e.zip |
-keep reading from client to support multiple GNS requests in parallel
-rw-r--r-- | src/gns/gns.conf.in | 12 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns.c | 3 | ||||
-rw-r--r-- | src/gns/test_gns_delegated_lookup.sh | 2 | ||||
-rw-r--r-- | src/gns/test_gns_lookup.conf | 2 | ||||
-rw-r--r-- | src/gns/test_gns_lookup.sh | 14 |
5 files changed, 8 insertions, 25 deletions
diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in index f2d65adfe..91fd822f8 100644 --- a/src/gns/gns.conf.in +++ b/src/gns/gns.conf.in | |||
@@ -8,13 +8,6 @@ UNIXPATH = /tmp/gnunet-service-gns.sock | |||
8 | 8 | ||
9 | ZONE_DIR = $SERVICEHOME/gns/ | 9 | ZONE_DIR = $SERVICEHOME/gns/ |
10 | 10 | ||
11 | # Should we hijack DNS queries using the Linux firewall? | ||
12 | # (this only works on GNU/Linux systems) | ||
13 | HIJACK_DNS = NO | ||
14 | |||
15 | # Automatically import PKEYs we learn into the shorten zone? | ||
16 | AUTO_IMPORT_PKEY = YES | ||
17 | |||
18 | # Do we require users that want to access GNS to run this process | 11 | # Do we require users that want to access GNS to run this process |
19 | # (usually not a good idea) | 12 | # (usually not a good idea) |
20 | UNIX_MATCH_UID = NO | 13 | UNIX_MATCH_UID = NO |
@@ -22,11 +15,6 @@ UNIX_MATCH_UID = NO | |||
22 | # Do we require users that want to access GNS to be in the 'gnunet' group? | 15 | # Do we require users that want to access GNS to be in the 'gnunet' group? |
23 | UNIX_MATCH_GID = YES | 16 | UNIX_MATCH_GID = YES |
24 | 17 | ||
25 | # When we automatically import PKEYs into shorten zone, require confirmation | ||
26 | # before they become active? (Not useful right now as the GUI to confirm | ||
27 | # doesn't exist -- and neither does the API...) | ||
28 | AUTO_IMPORT_CONFIRMATION_REQ = NO | ||
29 | |||
30 | # How many queries is GADS allowed to perform in the background at the same time? | 18 | # How many queries is GADS allowed to perform in the background at the same time? |
31 | MAX_PARALLEL_BACKGROUND_QUERIES = 25 | 19 | MAX_PARALLEL_BACKGROUND_QUERIES = 25 |
32 | 20 | ||
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 092bba705..5838dc740 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -504,8 +504,6 @@ send_lookup_response (void* cls, | |||
504 | &rmsg->header, | 504 | &rmsg->header, |
505 | GNUNET_NO); | 505 | GNUNET_NO); |
506 | GNUNET_free (rmsg); | 506 | GNUNET_free (rmsg); |
507 | GNUNET_SERVER_receive_done (clh->client, | ||
508 | GNUNET_OK); | ||
509 | GNUNET_CONTAINER_DLL_remove (clh_head, clh_tail, clh); | 507 | GNUNET_CONTAINER_DLL_remove (clh_head, clh_tail, clh); |
510 | GNUNET_SERVER_client_set_user_context (clh->client, NULL); | 508 | GNUNET_SERVER_client_set_user_context (clh->client, NULL); |
511 | GNUNET_free (clh); | 509 | GNUNET_free (clh); |
@@ -564,6 +562,7 @@ handle_lookup (void *cls, | |||
564 | return; | 562 | return; |
565 | } | 563 | } |
566 | GNUNET_STRINGS_utf8_tolower (utf_in, &nameptr); | 564 | GNUNET_STRINGS_utf8_tolower (utf_in, &nameptr); |
565 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | ||
567 | 566 | ||
568 | clh = GNUNET_new (struct ClientLookupHandle); | 567 | clh = GNUNET_new (struct ClientLookupHandle); |
569 | GNUNET_SERVER_client_set_user_context (client, clh); | 568 | GNUNET_SERVER_client_set_user_context (client, clh); |
diff --git a/src/gns/test_gns_delegated_lookup.sh b/src/gns/test_gns_delegated_lookup.sh index 2e0f6c8e2..d18f78929 100644 --- a/src/gns/test_gns_delegated_lookup.sh +++ b/src/gns/test_gns_delegated_lookup.sh | |||
@@ -10,7 +10,7 @@ gnunet-arm -s -c test_gns_lookup.conf | |||
10 | 10 | ||
11 | gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf | 11 | gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf |
12 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 12 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
13 | RES_IP=$(gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf) | 13 | RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf) |
14 | 14 | ||
15 | gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf | 15 | gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf |
16 | gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 16 | gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
diff --git a/src/gns/test_gns_lookup.conf b/src/gns/test_gns_lookup.conf index 86c6fc1f8..94042a5e9 100644 --- a/src/gns/test_gns_lookup.conf +++ b/src/gns/test_gns_lookup.conf | |||
@@ -12,7 +12,7 @@ DEFAULTSERVICES = | |||
12 | SERVICEHOME = /tmp/test-gnunet-gns-peer-1/ | 12 | SERVICEHOME = /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_lookup.sh b/src/gns/test_gns_lookup.sh index 8c876df61..bfb59c50f 100644 --- a/src/gns/test_gns_lookup.sh +++ b/src/gns/test_gns_lookup.sh | |||
@@ -1,23 +1,19 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
3 | 3 | rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME` | |
4 | TEST_IP="127.0.0.1" | 4 | TEST_IP="127.0.0.1" |
5 | |||
6 | gnunet-arm -s -c test_gns_lookup.conf | 5 | gnunet-arm -s -c test_gns_lookup.conf |
7 | 6 | gnunet-identity -C testego -c test_gns_lookup.conf | |
8 | #gnunet-identity -C testego -c test_gns_lookup.conf | ||
9 | |||
10 | gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 7 | gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
11 | RES_IP=$(gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf) | 8 | RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf) |
12 | |||
13 | gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 9 | gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
14 | 10 | gnunet-identity -D testego -c test_gns_lookup.conf | |
15 | gnunet-arm -e -c test_gns_lookup.conf | 11 | gnunet-arm -e -c test_gns_lookup.conf |
16 | 12 | ||
17 | if [ "$RES_IP" == "$TEST_IP" ] | 13 | if [ "$RES_IP" == "$TEST_IP" ] |
18 | then | 14 | then |
19 | exit 0 | 15 | exit 0 |
20 | else | 16 | else |
17 | echo "Failed to resolve to proper IP, got $RES_IP." | ||
21 | exit 1 | 18 | exit 1 |
22 | fi | 19 | fi |
23 | |||