From 5cb62b557507808d897b17cbf8495ed3efe132c0 Mon Sep 17 00:00:00 2001 From: Nico Thomas Date: Tue, 23 Nov 2021 12:31:18 +0100 Subject: RECLAIM: Fix bug that multiple attributes with the same name are added in CLI --- src/reclaim/gnunet-reclaim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c index cefb66b8f..da5f90409 100644 --- a/src/reclaim/gnunet-reclaim.c +++ b/src/reclaim/gnunet-reclaim.c @@ -521,7 +521,7 @@ iter_cb (void *cls, char *id; const char *attr_type; - if ((NULL != attr_name) && (NULL != claim)) + if ((NULL != attr_name) && (NULL == claim)) { if (0 == strcasecmp (attr_name, attr->name)) { @@ -530,6 +530,7 @@ iter_cb (void *cls, attr->type, attr->data, attr->data_size); + claim->id = attr->id; } } else if (issue_attrs) @@ -830,7 +831,7 @@ main (int argc, char *const argv[]) GNUNET_GETOPT_option_string ('a', "add", "NAME", - gettext_noop ("Add an attribute NAME"), + gettext_noop ("Add or update an attribute NAME"), &attr_name), GNUNET_GETOPT_option_string ('d', "delete", -- cgit v1.2.3