summaryrefslogtreecommitdiff
path: root/src/gns/gnunet-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-gns.c
parent16cf819a0feb38c36b046c59febae5bc511a3d1b (diff)
downloadgnunet-366546f576315e0de97a700546d108a974161734.tar.gz
gnunet-366546f576315e0de97a700546d108a974161734.zip
-add cached flag for performance
Diffstat (limited to 'src/gns/gnunet-gns.c')
-rw-r--r--src/gns/gnunet-gns.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index 78fe513ec..6b0ae5dca 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -151,6 +151,7 @@ run (void *cls, char *const *args, const char *cfgfile,
151 struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; 151 struct GNUNET_CRYPTO_ShortHashCode *zone = NULL;
152 struct GNUNET_CRYPTO_ShortHashCode *shorten_zone = NULL; 152 struct GNUNET_CRYPTO_ShortHashCode *shorten_zone = NULL;
153 struct GNUNET_CRYPTO_ShortHashCode user_zone; 153 struct GNUNET_CRYPTO_ShortHashCode user_zone;
154 struct GNUNET_CRYPTO_ShortHashCode user_shorten_zone;
154 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; 155 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename;
155 156
156 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", 157 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
@@ -197,12 +198,12 @@ run (void *cls, char *const *args, const char *cfgfile,
197 GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); 198 GNUNET_CRYPTO_rsa_key_get_public (key, &pkey);
198 GNUNET_CRYPTO_short_hash(&pkey, 199 GNUNET_CRYPTO_short_hash(&pkey,
199 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 200 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
200 &user_zone); 201 &user_shorten_zone);
201 shorten_zone = &user_zone; 202 shorten_zone = &user_shorten_zone;
202 GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename); 203 GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename);
203 if (!raw) 204 if (!raw)
204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 205 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
205 "Using zone: %s!\n", &zonename); 206 "Using shorten zone: %s!\n", &zonename);
206 GNUNET_CRYPTO_rsa_key_free(key); 207 GNUNET_CRYPTO_rsa_key_free(key);
207 } 208 }
208 GNUNET_free(keyfile); 209 GNUNET_free(keyfile);
@@ -237,6 +238,7 @@ run (void *cls, char *const *args, const char *cfgfile,
237 GNUNET_GNS_lookup_zone (gns, lookup_name, 238 GNUNET_GNS_lookup_zone (gns, lookup_name,
238 zone, shorten_zone, 239 zone, shorten_zone,
239 rtype, 240 rtype,
241 GNUNET_YES, //Use DHT
240 &process_lookup_result, lookup_name); 242 &process_lookup_result, lookup_name);
241 } 243 }
242 244