[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] branch master updated: act on reader disable
From: |
gnunet |
Subject: |
[taler-taler-mdb] branch master updated: act on reader disable |
Date: |
Tue, 10 Dec 2019 10:37:40 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository taler-mdb.
The following commit(s) were added to refs/heads/master by this push:
new ee1e875 act on reader disable
ee1e875 is described below
commit ee1e8756f0df0963804386b1fff8b59a97079d35
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Dec 10 10:37:37 2019 +0100
act on reader disable
---
src/main.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/main.c b/src/main.c
index 0a77db0..bf9172f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -140,7 +140,7 @@ along with
* Machine is polling for something.
*/
#define VMC_POLL 0x12
-
+
/**
* Vending, with sub-command.
*/
@@ -155,6 +155,7 @@ along with
* Commands for the reader (our device).
*/
#define VMC_READER 0x14
+#define VMC_READER_DISABLE 0x00
#define VMC_READER_ENABLE 0x01
#define VMC_READER_CANCEL 0x02
@@ -1302,7 +1303,8 @@ launch_payment (const struct Product *product)
"summary", product->description,
"amount", TALER_JSON_from_amount (&product->price),
"fulfillment_url", fulflmntUrl
- ,"auto_refund", GNUNET_JSON_from_time_rel
(MAX_REFUND_DELAY)
+ ,"auto_refund", GNUNET_JSON_from_time_rel (
+ MAX_REFUND_DELAY)
);
GNUNET_free (fulflmntUrl);
if (NULL == orderReq)
@@ -1653,7 +1655,7 @@ write_mdb_command (void *cls)
chkSum += mdb.txBuffer[idx] = mdb.cmd->cmd.bin[idx];
for (size_t idx = 0; idx < mdb.cmd->data.bin_size; idx++)
chkSum += mdb.txBuffer[idx + mdb.cmd->cmd.bin_size] =
- mdb.cmd->data.bin[idx];
+ mdb.cmd->data.bin[idx];
mdb.txBuffer[mdb.cmd->cmd.bin_size + mdb.cmd->data.bin_size] =
(uint8_t) (chkSum & 0xFF);
}
@@ -1846,6 +1848,16 @@ handle_command (const char *hex,
switch (subcmd)
{
+ case VMC_READER_DISABLE:
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Received Reader Disable via MDB\n");
+ mdb.session_running = GNUNET_NO;
+ if (NULL != payment_activity)
+ {
+ cleanup_payment (payment_activity);
+ payment_activity = NULL;
+ }
+ break;
case VMC_READER_ENABLE:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received Reader Enable via MDB\n");
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-mdb] branch master updated: act on reader disable,
gnunet <=