[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32351 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32351 - gnunet/src/gns |
Date: |
Sun, 16 Feb 2014 15:55:07 +0100 |
Author: grothoff
Date: 2014-02-16 15:55:07 +0100 (Sun, 16 Feb 2014)
New Revision: 32351
Modified:
gnunet/src/gns/gnunet-gns.c
Log:
force not using DHT for lookups that are only in the master zone (#3325)
Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2014-02-16 14:54:42 UTC (rev 32350)
+++ gnunet/src/gns/gnunet-gns.c 2014-02-16 14:55:07 UTC (rev 32351)
@@ -61,6 +61,11 @@
static char *public_key;
/**
+ * Set to #GNUNET_YES if we must not use the DHT (only local lookup).
+ */
+static int only_cached;
+
+/**
* raw output
*/
static int raw;
@@ -206,7 +211,7 @@
lookup_name,
pkey,
rtype,
- GNUNET_NO, /* Use DHT */
+ only_cached,
shorten_key,
&process_lookup_result,
lookup_name);
@@ -328,6 +333,7 @@
const char *name)
{
struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
+ const char *dot;
id_op = NULL;
if (NULL == ego)
@@ -338,6 +344,11 @@
return;
}
GNUNET_IDENTITY_ego_get_public_key (ego, &pkey);
+ /* if the name is of the form 'label.gnu', never go to the DHT */
+ dot = strchr (lookup_name, '.');
+ if ( (NULL != dot) &&
+ (0 == strcasecmp (dot, ".gnu")) )
+ only_cached = GNUNET_YES;
lookup_with_public_key (&pkey);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32351 - gnunet/src/gns,
gnunet <=