[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] 19/23: fix end session handling
From: |
gnunet |
Subject: |
[taler-taler-mdb] 19/23: fix end session handling |
Date: |
Wed, 04 Dec 2019 14:16:05 +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 8f60d0f980ff212e3bb43736bde2f3e365615589
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 4 13:22:58 2019 +0100
fix end session handling
---
src/main.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/main.c b/src/main.c
index 0bc4c2f..e7145a1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -766,7 +766,7 @@ wallet_transmit_uri (void *cls)
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "'PUT DATA' command sent successfully\n");
+ "'PUT DATA' command sent successfully via NFC\n");
pa->wallet_has_uri = GNUNET_YES;
/* FIXME: or just offer Internet service here? */
pa->delay_task = GNUNET_SCHEDULER_add_delayed (MAX_HTTP_RETRY_FREQ,
@@ -791,7 +791,7 @@ wallet_select_aid (void *cls)
memcpy (&message[sizeof (select_file)], taler_aid, sizeof (taler_aid));
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Trying to find Taler wallet\n");
+ "Trying to find Taler wallet on NFC\n");
if (0 > nfc_initiator_transceive_bytes (pa->pnd,
message,
sizeof (message),
@@ -810,7 +810,7 @@ wallet_select_aid (void *cls)
sizeof (response)))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Taler wallet found\n");
+ "Taler wallet found over NFC\n");
pa->delay_task = GNUNET_SCHEDULER_add_now (&wallet_transmit_uri,
pa);
return;
@@ -1388,7 +1388,7 @@ handle_command (const char *hex,
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Unknown product %u selected, denying vend\n",
+ "Unknown product %u selected on MDB, denying vend\n",
product);
mdb.cmd = &denyVend;
break;
@@ -1401,8 +1401,8 @@ handle_command (const char *hex,
{
mdb.cmd = &endSession;
mdb.session_running = GNUNET_NO;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Vend Failure\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Received MDB vend failure, refunding customer (FIXME:
not implemented)\n");
/* FIXME: refund logic here! */
if (NULL != payment_activity)
{
@@ -1414,7 +1414,7 @@ handle_command (const char *hex,
case VMC_VEND_SESSION_COMPLETE:
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Session Complete\n");
+ "Received MDB session complete\n");
mdb.session_running = GNUNET_NO;
mdb.cmd = &endSession;
cleanup_payment (payment_activity);
@@ -1432,7 +1432,7 @@ handle_command (const char *hex,
}
case VMC_CONF:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received request for configuration\n");
+ "Received request for configuration via MDB\n");
mdb.cmd = &readerConfigData;
break;
case 0x14:
@@ -1456,7 +1456,7 @@ handle_command (const char *hex,
{
case 0x01:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received Reader Enable\n");
+ "Received Reader Enable via MDB\n");
mdb.session_running = GNUNET_NO;
break;
default:
@@ -1470,12 +1470,15 @@ handle_command (const char *hex,
}
case VMC_ACKN:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received Acknowledge (for %s)\n",
+ "Received acknowledgement (for command `%s') from MDB\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
if (&beginSession == mdb.last_cmd)
mdb.session_running = GNUNET_YES;
if (&denyVend == mdb.last_cmd)
+ {
+ mdb.session_running = GNUNET_NO;
mdb.cmd = &endSession;
+ }
mdb.last_cmd = NULL;
if (NULL != mdb.wtask)
{
@@ -1485,7 +1488,7 @@ handle_command (const char *hex,
break;
case VMC_OOSQ:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received Command out of Sequence (%s)\n",
+ "Received command out of sequence from MDB (for command
`%s')\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
mdb.session_running = GNUNET_NO;
if (mdb.last_cmd != &endSession)
@@ -1495,7 +1498,7 @@ handle_command (const char *hex,
break;
case VMC_RETR:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Received request to resend previous data (%s)\n",
+ "Received request to resend previous data from MDB (previous
command was `%s')\n",
(NULL != mdb.last_cmd) ? mdb.last_cmd->name : "?");
GNUNET_break (NULL == mdb.cmd);
GNUNET_break (NULL != mdb.last_cmd);
@@ -1504,7 +1507,7 @@ handle_command (const char *hex,
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Unknown MDB command %X\n",
+ "Received unknown MDB command %X\n",
cmd);
break;
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-taler-mdb] 04/23: mdb communication working (test integration), (continued)
- [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, 2019/12/04
- [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 <=
- [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
- [taler-taler-mdb] 20/23: add 'a' command, gnunet, 2019/12/04
- [taler-taler-mdb] 16/23: clarify input, gnunet, 2019/12/04