gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

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