aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-11 14:48:02 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-10-11 14:48:02 +0200
commit559daabee673134f03d76f16d25c1e0ef23b4fdc (patch)
treeeed15cd757cdf6d968ff9d0390837a1ba6f7269e /src/util
parent3b80c8d9daddaeaf033d0b0d3f6cda842a939c8d (diff)
downloadgnunet-559daabee673134f03d76f16d25c1e0ef23b4fdc.tar.gz
gnunet-559daabee673134f03d76f16d25c1e0ef23b4fdc.zip
fix rest; uncrustify
Diffstat (limited to 'src/util')
-rw-r--r--src/util/gnunet-service-resolver.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c
index 23ba39fee..d7d456fba 100644
--- a/src/util/gnunet-service-resolver.c
+++ b/src/util/gnunet-service-resolver.c
@@ -642,9 +642,9 @@ try_cache (const char *hostname,
642 const struct GNUNET_DNSPARSER_Record *record = rle->record; 642 const struct GNUNET_DNSPARSER_Record *record = rle->record;
643 643
644 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 644 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
645 "Found cache entry for '%s', record type '%u'\n", 645 "Checking cache entry for '%s', record is for '%s'\n",
646 hostname, 646 hostname,
647 record_type); 647 record->name);
648 if ((GNUNET_DNSPARSER_TYPE_CNAME == record->type) && 648 if ((GNUNET_DNSPARSER_TYPE_CNAME == record->type) &&
649 (GNUNET_DNSPARSER_TYPE_CNAME != record_type) && (GNUNET_NO == found)) 649 (GNUNET_DNSPARSER_TYPE_CNAME != record_type) && (GNUNET_NO == found))
650 { 650 {
@@ -653,7 +653,8 @@ try_cache (const char *hostname,
653 process_get (hostname, record_type, client_request_id, client); 653 process_get (hostname, record_type, client_request_id, client);
654 return GNUNET_YES; /* counts as a cache "hit" */ 654 return GNUNET_YES; /* counts as a cache "hit" */
655 } 655 }
656 found |= send_reply (rle->record, record_type, client_request_id, client); 656 if (0 == strcmp (record->name, hostname))
657 found |= send_reply (rle->record, record_type, client_request_id, client);
657 } 658 }
658 if (GNUNET_NO == found) 659 if (GNUNET_NO == found)
659 return GNUNET_NO; /* had records, but none matched! */ 660 return GNUNET_NO; /* had records, but none matched! */
@@ -723,6 +724,9 @@ cache_answers (const char *name,
723 { 724 {
724 rc = GNUNET_new (struct ResolveCache); 725 rc = GNUNET_new (struct ResolveCache);
725 rc->hostname = GNUNET_strdup (name); 726 rc->hostname = GNUNET_strdup (name);
727 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
728 "Caching record for name %s under %s\n",
729 record->name, name);
726 GNUNET_CONTAINER_DLL_insert (cache_head, cache_tail, rc); 730 GNUNET_CONTAINER_DLL_insert (cache_head, cache_tail, rc);
727 cache_size++; 731 cache_size++;
728 } 732 }