taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 5384d76a6ab22bd508a2af5ec4b3bfeb3b7667dc
parent fbef2d25b3d2e161b35226d2c878762101c8b23f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  4 Dec 2019 12:40:25 +0100

neg cond

Diffstat:
Msrc/main.c | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -387,7 +387,7 @@ static struct MdbCommand endSession; */ static const char *FRAMEBUFFER_DEVICE = "/dev/fb1"; -static const char *UART_DEVICE = "/dev/ttyAMA0"; +static const char *UART_DEVICE; /** * Taler wallet application identifier @@ -1487,8 +1487,8 @@ read_mdb_command (void *cls) if (cmdEndIdx == mdb.rx_off) { /* check to make sure rxBuffer was big enough in principle */ - if ( (cmdStartIdx > 0) || - (mdb.rx_off < sizeof (mdb.rxBuffer)) ) + if ( (cmdStartIdx == 0) && + (mdb.rx_off == sizeof (mdb.rxBuffer)) ) { /* Developer: if this happens, try increasing rxBuffer! */ GNUNET_break (0); @@ -1709,6 +1709,17 @@ run (void *cls, return; } if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, + "taler-mdb", + "UART_DEVICE", + &UART_DEVICE)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "taler-mdb", + "UART_DEVICE"); + UART_DEVICE = GNUNET_strdup ("/dev/ttyAMA0"); + } + if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "taler-mdb", "backend-base-url",