gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: RECLAIM: verify cli does not issue ticke


From: gnunet
Subject: [gnunet] branch master updated: RECLAIM: verify cli does not issue tickets when missing attributes
Date: Thu, 04 Apr 2024 01:10:00 +0200

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

thejackimonster pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 9da0b739a RECLAIM: verify cli does not issue tickets when missing 
attributes
9da0b739a is described below

commit 9da0b739a221d3998f93310e2b65112484290cea
Author: TheJackiMonster <thejackimonster@gmail.com>
AuthorDate: Thu Apr 4 01:07:52 2024 +0200

    RECLAIM: verify cli does not issue tickets when missing attributes
    
    Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
---
 src/cli/reclaim/gnunet-reclaim.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/cli/reclaim/gnunet-reclaim.c b/src/cli/reclaim/gnunet-reclaim.c
index efb2c2902..901dd6bf6 100644
--- a/src/cli/reclaim/gnunet-reclaim.c
+++ b/src/cli/reclaim/gnunet-reclaim.c
@@ -413,6 +413,9 @@ process_delete (void *cls, int success, const char *msg)
 static void
 iter_finished (void *cls)
 {
+  struct GNUNET_RECLAIM_AttributeListEntry *le;
+  char *attrs_tmp;
+  char *attr_str;
   char *data;
   size_t data_size;
   int type;
@@ -426,6 +429,34 @@ iter_finished (void *cls)
 
   if (issue_attrs)
   {
+    attrs_tmp = GNUNET_strdup (issue_attrs);
+    attr_str = strtok (attrs_tmp, ",");
+    while (NULL != attr_str)
+    {
+      le = attr_list->list_head;
+      while (le)
+      {
+        if (0 == strcasecmp (attr_str, le->attribute->name))
+          break;
+
+        le = le->next;
+      }
+
+      if (! le)
+      {
+        fprintf (stdout, "No such attribute ``%s''\n", attr_str);
+        break;
+      }
+      
+      attr_str = strtok (NULL, ",");
+    }
+    GNUNET_free (attrs_tmp);
+    if (NULL != attr_str)
+    {
+      GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
+      return;
+    }
+
     reclaim_op = GNUNET_RECLAIM_ticket_issue (reclaim_handle,
                                               pkey,
                                               &rp_key,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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