[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.
- [taler-taler-mdb] 03/23: Some corrections, (continued)
- [taler-taler-mdb] 03/23: Some corrections, gnunet, 2019/12/04
- [taler-taler-mdb] 13/23: fix shutdown, gnunet, 2019/12/04
- [taler-taler-mdb] 05/23: some little bugfixes, gnunet, 2019/12/04
- [taler-taler-mdb] 09/23: neg cond, gnunet, 2019/12/04
- [taler-taler-mdb] 08/23: neg cond, gnunet, 2019/12/04
- [taler-taler-mdb] 04/23: mdb communication working (test integration), gnunet, 2019/12/04
- [taler-taler-mdb] 10/23: parse filenames from config, gnunet, 2019/12/04
- [taler-taler-mdb] 01/23: Added mdb communication module, gnunet, 2019/12/04
- [taler-taler-mdb] 02/23: integration mdb first try, gnunet, 2019/12/04
- [taler-taler-mdb] 06/23: major mdb refactoring, gnunet, 2019/12/04
- [taler-taler-mdb] 23/23: add TODO,
gnunet <=
- [taler-taler-mdb] 15/23: config, gnunet, 2019/12/04
- [taler-taler-mdb] 21/23: fix NPE, gnunet, 2019/12/04
- [taler-taler-mdb] 22/23: logging, gnunet, 2019/12/04
- [taler-taler-mdb] 17/23: invert checks, gnunet, 2019/12/04
- [taler-taler-mdb] 19/23: fix end session handling, gnunet, 2019/12/04
- [taler-taler-mdb] 11/23: use more named constants, gnunet, 2019/12/04
- [taler-taler-mdb] 14/23: fix FTBFS, gnunet, 2019/12/04
- [taler-taler-mdb] 12/23: nicer logging, gnunet, 2019/12/04
- [taler-taler-mdb] 07/23: refactor, gnunet, 2019/12/04
- [taler-taler-mdb] 18/23: invert checks, gnunet, 2019/12/04