gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: do not display label if the


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: do not display label if there are no matching records
Date: Tue, 30 Apr 2019 19:20:27 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 3cf07732f do not display label if there are no matching records
3cf07732f is described below

commit 3cf07732fca4fd293874837833698fe0bfa279b2
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Apr 30 19:20:03 2019 +0200

    do not display label if there are no matching records
---
 src/namestore/gnunet-namestore.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 916f994b7..cbaf9a5cb 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2012, 2013, 2014 GNUnet e.V.
+     Copyright (C) 2012, 2013, 2014, 2019 GNUnet e.V.
 
      GNUnet is free software: you can redistribute it and/or modify it
      under the terms of the GNU Affero General Public License as published
@@ -417,12 +417,26 @@ display_record (const char *rname,
   const char *ets;
   struct GNUNET_TIME_Absolute at;
   struct GNUNET_TIME_Relative rt;
+  int have_record;
 
   if ((NULL != name) && (0 != strcmp (name, rname)))
   {
     GNUNET_NAMESTORE_zone_iterator_next (list_it, 1);
     return;
   }
+  have_record = GNUNET_NO;
+  for (unsigned int i = 0; i < rd_len; i++)
+  {
+    if ((GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) &&
+        (0 != strcmp (rname, GNUNET_GNS_EMPTY_LABEL_AT)))
+      continue;
+    if ((type != rd[i].record_type) && (GNUNET_GNSRECORD_TYPE_ANY != type))
+      continue;
+    have_record = GNUNET_YES;
+    break;
+  }
+  if (GNUNET_NO == have_record)
+    return;
   FPRINTF (stdout, "%s:\n", rname);
   if (NULL != typestring)
     type = GNUNET_GNSRECORD_typename_to_number (typestring);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]