gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-mdb] 20/23: add 'a' command


From: gnunet
Subject: [taler-taler-mdb] 20/23: add 'a' command
Date: Wed, 04 Dec 2019 14:16:06 +0100

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

grothoff pushed a commit to branch master
in repository taler-mdb.

commit ab91096f041ef69572c995f242b68ef78400b923
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 4 13:35:33 2019 +0100

    add 'a' command
---
 src/main.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index e7145a1..fe47ced 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1177,6 +1177,23 @@ read_keyboard_command (void *cls)
     start_read_keyboard ();
     return;
   }
+  if ((char) input == 'a')
+  {
+    if (NULL != payment_activity)
+    {
+      mdb.cmd = &approveVend;
+      run_mdb_event_loop ();
+      cleanup_payment (payment_activity);
+      payment_activity = NULL;
+    }
+    else
+    {
+      fprintf (stderr,
+               "No purchase activity pending\n");
+    }
+    start_read_keyboard ();
+    return;
+  }
   if (NULL != payment_activity)
   {
     fprintf (stderr,
@@ -1211,7 +1228,9 @@ start_read_keyboard ()
     printf ("'%c' to buy %s\n",
             products[i].key,
             products[i].description);
-  printf ("'c' to cancel last purchase\n'x' to quit\n");
+  printf ("'a' to fake payment for the last purchase\n"
+          "'c' to cancel last purchase\n"
+          "'x' to quit\n");
   printf ("Waiting for keyboard input\n");
   keyboard_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
                                                   &fh,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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