[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20758 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20758 - gnunet/src/gns |
Date: |
Sun, 25 Mar 2012 23:56:39 +0200 |
Author: schanzen
Date: 2012-03-25 23:56:39 +0200 (Sun, 25 Mar 2012)
New Revision: 20758
Modified:
gnunet/src/gns/gnunet-service-gns_resolver.c
Log:
-less dht record lookups
Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c 2012-03-25 21:39:45 UTC
(rev 20757)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c 2012-03-25 21:56:39 UTC
(rev 20758)
@@ -1395,12 +1395,23 @@
if (rd_count == 0)
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "GNS_PHASE_REC: Resolution status: %d!\n", rh->status);
+ "GNS_PHASE_REC: NS returned no records. (status: %d)!\n",
+ rh->status);
- /* ns entry expired and not ours. try dht */
+ /**
+ * There are 4 conditions that have to met for us to consult the DHT:
+ * 1. The entry in the DHT is EXPIRED AND
+ * 2. No entry in the NS existed AND
+ * 3. The zone queried is not the local resolver's zone AND
+ * 4. The name that was looked up is '+'
+ * because if it was any other canonical name we either already queried
+ * the DHT for the authority in the authority lookup phase (and thus
+ * would already have an entry in the NS for the record)
+ */
if (rh->status & (EXPIRED | !EXISTS) &&
GNUNET_CRYPTO_short_hash_cmp(&rh->authority_chain_head->zone,
- &local_zone))
+ &local_zone) &&
+ (strcmp(rh->name, "+") == 0))
{
rh->proc = &handle_record_dht;
resolve_record_dht(rh);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20758 - gnunet/src/gns,
gnunet <=