gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-mdb] 23/23: add TODO


From: gnunet
Subject: [taler-taler-mdb] 23/23: add TODO
Date: Wed, 04 Dec 2019 14:16:09 +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 9065ce55d75b8bdabd3d646ab09375a282ace96c
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 4 14:11:14 2019 +0100

    add TODO
---
 src/main.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/src/main.c b/src/main.c
index b99a075..af40fe6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -21,6 +21,22 @@ along with
 * @brief main functionality of the application
 * @author Boss Marco
 * @author Christian Grothoff
+*
+* TODO:
+* - comment code (Boss)
+* - replace remaining MDB magic constants with #defines (Hofer)
+* - support command line option to "disable_mdb" to run without
+*   connected MDB (instead of failing to launch); in this
+*   mode, print out what WOULD be done with MDB (Grothoff)
+* - in keyboard interaction, distinguish between
+*   payment pending and payment not pending, allow
+*   'c', only if pending (Grothoff)
+* - have new state for waiting for MDB to signal vend success/failure
+*   in keyboard interaction prompt for success y/n at that time (or c cancel) 
(Grothoff)
+* - add key strokes for "failure to vend" and "vend successful"
+*   (useful when faking MDB interaction), factor out function for
+    the respective operations! (Grothoff)
+* - implement refunds on failure to vend (TBD)
 */
 #include "config.h"
 #include <stdio.h>
@@ -439,6 +455,11 @@ static char *framebuffer_device_filename;
  */
 static char *uart_device_filename;
 
+/**
+ * Global option '-d' to disable MDB set.
+ */
+static int disable_mdb;
+
 /**
  * Taler wallet application identifier
  */
@@ -1618,6 +1639,8 @@ run_mdb_event_loop ()
 {
   struct GNUNET_DISK_FileHandle fh = { mdb.uartfd };
 
+  if (disable_mdb)
+    return;
   if ( (GNUNET_NO == mdb.session_running) &&
        (NULL == mdb.cmd) &&
        (NULL == mdb.last_cmd) )
@@ -1724,6 +1747,8 @@ mdb_init ()
 {
   struct termios uart_opts_raw;
 
+  if (disable_mdb)
+    return GNUNET_OK;
   /* open uart connection */
   if (0 > (mdb.uartfd = open (uart_device_filename,
                               O_RDWR | O_NOCTTY | O_NDELAY)))
@@ -2056,6 +2081,10 @@ main (int argc,
   int ret;
   /* the available command line options */
   struct GNUNET_GETOPT_CommandLineOption options[] = {
+    GNUNET_GETOPT_option_flag ('d',
+                               "disable-mdb",
+                               "disable all interactions with the MDB (for 
testing without machine)",
+                               &disable_mdb),
     GNUNET_GETOPT_OPTION_END
   };
   int have_tty;

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



reply via email to

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