gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-mdb] 08/23: neg cond


From: gnunet
Subject: [taler-taler-mdb] 08/23: neg cond
Date: Wed, 04 Dec 2019 14:15:54 +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 5384d76a6ab22bd508a2af5ec4b3bfeb3b7667dc
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 4 12:40:25 2019 +0100

    neg cond
---
 src/main.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index d6c283e..63ce5f1 100644
--- 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);
@@ -1708,6 +1708,17 @@ run (void *cls,
     global_ret = EXIT_FAILURE;
     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",

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



reply via email to

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