aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-24 08:28:19 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-24 08:28:19 +0000
commit6c33a3bbe11a98b306b42854812d8af6662b892e (patch)
tree8882ce9a28d1217de7466bc3ebda0de28e47b5ff
parent6817ec26a3d87926add681d37685214fc3370541 (diff)
downloadgnunet-6c33a3bbe11a98b306b42854812d8af6662b892e.tar.gz
gnunet-6c33a3bbe11a98b306b42854812d8af6662b892e.zip
-keep reading from client to support multiple GNS requests in parallel
-rw-r--r--src/gns/gns.conf.in12
-rw-r--r--src/gns/gnunet-service-gns.c3
-rw-r--r--src/gns/test_gns_delegated_lookup.sh2
-rw-r--r--src/gns/test_gns_lookup.conf2
-rw-r--r--src/gns/test_gns_lookup.sh14
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
9ZONE_DIR = $SERVICEHOME/gns/ 9ZONE_DIR = $SERVICEHOME/gns/
10 10
11# Should we hijack DNS queries using the Linux firewall?
12# (this only works on GNU/Linux systems)
13HIJACK_DNS = NO
14
15# Automatically import PKEYs we learn into the shorten zone?
16AUTO_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)
20UNIX_MATCH_UID = NO 13UNIX_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?
23UNIX_MATCH_GID = YES 16UNIX_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...)
28AUTO_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?
31MAX_PARALLEL_BACKGROUND_QUERIES = 25 19MAX_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
11gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 11gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
12gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 12gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
13RES_IP=$(gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf) 13RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf)
14 14
15gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 15gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
16gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 16gnunet-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 =
12SERVICEHOME = /tmp/test-gnunet-gns-peer-1/ 12SERVICEHOME = /tmp/test-gnunet-gns-peer-1/
13 13
14[gns] 14[gns]
15PREFIX = valgrind --leak-check=full --track-origins=yes 15#PREFIX = valgrind --leak-check=full --track-origins=yes
16AUTOSTART = YES 16AUTOSTART = YES
17AUTO_IMPORT_PKEY = YES 17AUTO_IMPORT_PKEY = YES
18MAX_PARALLEL_BACKGROUND_QUERIES = 10 18MAX_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
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3 3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME`
4TEST_IP="127.0.0.1" 4TEST_IP="127.0.0.1"
5
6gnunet-arm -s -c test_gns_lookup.conf 5gnunet-arm -s -c test_gns_lookup.conf
7 6gnunet-identity -C testego -c test_gns_lookup.conf
8#gnunet-identity -C testego -c test_gns_lookup.conf
9
10gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 7gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
11RES_IP=$(gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf) 8RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf)
12
13gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 9gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14 10gnunet-identity -D testego -c test_gns_lookup.conf
15gnunet-arm -e -c test_gns_lookup.conf 11gnunet-arm -e -c test_gns_lookup.conf
16 12
17if [ "$RES_IP" == "$TEST_IP" ] 13if [ "$RES_IP" == "$TEST_IP" ]
18then 14then
19 exit 0 15 exit 0
20else 16else
17 echo "Failed to resolve to proper IP, got $RES_IP."
21 exit 1 18 exit 1
22fi 19fi
23