gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 02/06: fix payment secret issue


From: gnunet
Subject: [taler-anastasis] 02/06: fix payment secret issue
Date: Sat, 29 Aug 2020 14:03:03 +0200

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit 27b42bf150c12d57c172e78ca66f63cab7676e01
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sat Aug 29 11:03:16 2020 +0200

    fix payment secret issue
---
 src/cli/anastasis-cli-splitter.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 47f884a..34bca71 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -1273,7 +1273,6 @@ read_keyboard_command (void *cls)
         GNUNET_SCHEDULER_shutdown ();
         return;
       }
-      // core secret here is just for testing, if payment is needed
       if (characters > strlen ("publish"))
       {
         char *token_start = &buffer[strlen ("publish ")];
@@ -1288,7 +1287,7 @@ read_keyboard_command (void *cls)
                     (char *) sss->core_secret);
         sss->http_status = MHD_HTTP_NO_CONTENT;
       }
-
+      // core secret here is just for testing, if payment is needed
       // FIXME: avoid uploading recovery document like this
       if (characters == strlen ("publish"))
       {
@@ -1317,6 +1316,18 @@ read_keyboard_command (void *cls)
           free (buffer);
           buffer = (char *) NULL;
         }
+        /** FIXME: Shall we delete order_id/payment secret if not given during 
second 'publish' command?
+         * Shall we even ask for payment secret, if given before? Or shall the 
user have the option
+         * to use a different payment secret for second/further 'publish' 
command/s?
+        */
+        else
+        {
+          if (pds[i]->payment_order_id)
+          {
+            GNUNET_free (pds[i]->payment_order_id);
+            pds[i]->payment_order_id = NULL;
+          }
+        }
         printf ("\n");
       }
       sss->pds = (const struct ANASTASIS_PaymentDetails **) pds;

-- 
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]