aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-11 15:50:40 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-11 15:50:40 +0000
commit366546f576315e0de97a700546d108a974161734 (patch)
tree87232a31739b479c7cde5b49b005923bc487fd42 /src/gns/gnunet-service-gns.c
parent16cf819a0feb38c36b046c59febae5bc511a3d1b (diff)
downloadgnunet-366546f576315e0de97a700546d108a974161734.tar.gz
gnunet-366546f576315e0de97a700546d108a974161734.zip
-add cached flag for performance
Diffstat (limited to 'src/gns/gnunet-service-gns.c')
-rw-r--r--src/gns/gnunet-service-gns.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index 8f8fbe41b..543ccf518 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -825,6 +825,7 @@ handle_lookup(void *cls,
825 char* nameptr = name; 825 char* nameptr = name;
826 struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL; 826 struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL;
827 struct GNUNET_CRYPTO_ShortHashCode zone; 827 struct GNUNET_CRYPTO_ShortHashCode zone;
828 int only_cached;
828 829
829 if (ntohs (message->size) < sizeof (struct GNUNET_GNS_ClientLookupMessage)) 830 if (ntohs (message->size) < sizeof (struct GNUNET_GNS_ClientLookupMessage))
830 { 831 {
@@ -856,6 +857,8 @@ handle_lookup(void *cls,
856 clh->unique_id = sh_msg->id; 857 clh->unique_id = sh_msg->id;
857 clh->type = ntohl(sh_msg->type); 858 clh->type = ntohl(sh_msg->type);
858 clh->shorten_key = NULL; 859 clh->shorten_key = NULL;
860
861 only_cached = ntohl(sh_msg->only_cached);
859 862
860 if (strlen (name) > MAX_DNS_NAME_LENGTH) { 863 if (strlen (name) > MAX_DNS_NAME_LENGTH) {
861 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 864 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
@@ -883,6 +886,7 @@ handle_lookup(void *cls,
883 gns_resolver_lookup_record(zone, zone, clh->type, name, 886 gns_resolver_lookup_record(zone, zone, clh->type, name,
884 key, 887 key,
885 default_lookup_timeout, 888 default_lookup_timeout,
889 only_cached,
886 &send_lookup_response, clh); 890 &send_lookup_response, clh);
887 } 891 }
888 else 892 else
@@ -890,6 +894,7 @@ handle_lookup(void *cls,
890 gns_resolver_lookup_record(zone, zone, clh->type, name, 894 gns_resolver_lookup_record(zone, zone, clh->type, name,
891 NULL, 895 NULL,
892 default_lookup_timeout, 896 default_lookup_timeout,
897 only_cached,
893 &send_lookup_response, clh); 898 &send_lookup_response, clh);
894 } 899 }
895} 900}