aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim
diff options
context:
space:
mode:
authorNico Thomas <nico.thomas@tum.de>2021-11-23 12:31:18 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2021-11-24 18:32:44 +0100
commit5cb62b557507808d897b17cbf8495ed3efe132c0 (patch)
tree0a348fbcc0601eb2fe6a66d802f0ed97fd5206ea /src/reclaim
parent36a92f6926bf3752054c0f2b77a04081041c0e9d (diff)
downloadgnunet-5cb62b557507808d897b17cbf8495ed3efe132c0.tar.gz
gnunet-5cb62b557507808d897b17cbf8495ed3efe132c0.zip
RECLAIM: Fix bug that multiple attributes with the same name are added in CLI
Diffstat (limited to 'src/reclaim')
-rw-r--r--src/reclaim/gnunet-reclaim.c5
1 files 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,
521 char *id; 521 char *id;
522 const char *attr_type; 522 const char *attr_type;
523 523
524 if ((NULL != attr_name) && (NULL != claim)) 524 if ((NULL != attr_name) && (NULL == claim))
525 { 525 {
526 if (0 == strcasecmp (attr_name, attr->name)) 526 if (0 == strcasecmp (attr_name, attr->name))
527 { 527 {
@@ -530,6 +530,7 @@ iter_cb (void *cls,
530 attr->type, 530 attr->type,
531 attr->data, 531 attr->data,
532 attr->data_size); 532 attr->data_size);
533 claim->id = attr->id;
533 } 534 }
534 } 535 }
535 else if (issue_attrs) 536 else if (issue_attrs)
@@ -830,7 +831,7 @@ main (int argc, char *const argv[])
830 GNUNET_GETOPT_option_string ('a', 831 GNUNET_GETOPT_option_string ('a',
831 "add", 832 "add",
832 "NAME", 833 "NAME",
833 gettext_noop ("Add an attribute NAME"), 834 gettext_noop ("Add or update an attribute NAME"),
834 &attr_name), 835 &attr_name),
835 GNUNET_GETOPT_option_string ('d', 836 GNUNET_GETOPT_option_string ('d',
836 "delete", 837 "delete",