diff options
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 16 |
1 files changed, 15 insertions, 1 deletions
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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2012, 2013, 2014 GNUnet e.V. | 3 | Copyright (C) 2012, 2013, 2014, 2019 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -417,12 +417,26 @@ display_record (const char *rname, | |||
417 | const char *ets; | 417 | const char *ets; |
418 | struct GNUNET_TIME_Absolute at; | 418 | struct GNUNET_TIME_Absolute at; |
419 | struct GNUNET_TIME_Relative rt; | 419 | struct GNUNET_TIME_Relative rt; |
420 | int have_record; | ||
420 | 421 | ||
421 | if ((NULL != name) && (0 != strcmp (name, rname))) | 422 | if ((NULL != name) && (0 != strcmp (name, rname))) |
422 | { | 423 | { |
423 | GNUNET_NAMESTORE_zone_iterator_next (list_it, 1); | 424 | GNUNET_NAMESTORE_zone_iterator_next (list_it, 1); |
424 | return; | 425 | return; |
425 | } | 426 | } |
427 | have_record = GNUNET_NO; | ||
428 | for (unsigned int i = 0; i < rd_len; i++) | ||
429 | { | ||
430 | if ((GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) && | ||
431 | (0 != strcmp (rname, GNUNET_GNS_EMPTY_LABEL_AT))) | ||
432 | continue; | ||
433 | if ((type != rd[i].record_type) && (GNUNET_GNSRECORD_TYPE_ANY != type)) | ||
434 | continue; | ||
435 | have_record = GNUNET_YES; | ||
436 | break; | ||
437 | } | ||
438 | if (GNUNET_NO == have_record) | ||
439 | return; | ||
426 | FPRINTF (stdout, "%s:\n", rname); | 440 | FPRINTF (stdout, "%s:\n", rname); |
427 | if (NULL != typestring) | 441 | if (NULL != typestring) |
428 | type = GNUNET_GNSRECORD_typename_to_number (typestring); | 442 | type = GNUNET_GNSRECORD_typename_to_number (typestring); |