summaryrefslogtreecommitdiff
path: root/easytool
diff options
context:
space:
mode:
Diffstat (limited to 'easytool')
-rw-r--r--easytool/data.c1
-rw-r--r--easytool/easycard.h1
-rw-r--r--easytool/easytool.c4
3 files changed, 6 insertions, 0 deletions
diff --git a/easytool/data.c b/easytool/data.c
index ac5530b..4b706a7 100644
--- a/easytool/data.c
+++ b/easytool/data.c
@@ -118,6 +118,7 @@ const struct value_string taipei_mrt_stn_id[] = {
/* Easycard Transaction Type names */
const struct value_string easy_tt_names[] = {
{ EASY_TT_MRT_ENTER, "Enter MRT Stn" },
+ { EASY_TT_MRT_REENTER, "ReEnter MRT Stn" },
{ EASY_TT_MRT_EXIT, "Leave MRT Stn" },
{ EASY_TT_PURCHASE, "Shop Purchase" },
{ 0, NULL }
diff --git a/easytool/easycard.h b/easytool/easycard.h
index b4d4afc..9d547f8 100644
--- a/easytool/easycard.h
+++ b/easytool/easycard.h
@@ -4,6 +4,7 @@
#include "utils.h"
#define EASY_TT_MRT_ENTER 0x00
+#define EASY_TT_MRT_REENTER 0x80
#define EASY_TT_MRT_EXIT 0x11
#define EASY_TT_PURCHASE 0x20
diff --git a/easytool/easytool.c b/easytool/easytool.c
index efb083f..b02842d 100644
--- a/easytool/easytool.c
+++ b/easytool/easytool.c
@@ -135,6 +135,7 @@ static void dump_easy_log(const struct easy_log_rec *elr)
elr->amount, elr->remaining);
switch (elr->trans_type) {
case EASY_TT_MRT_ENTER:
+ case EASY_TT_MRT_REENTER:
case EASY_TT_MRT_EXIT:
printf("\tMRT Station %s\n",
get_value_string(taipei_mrt_stn_id,
@@ -183,6 +184,9 @@ static void dump_easycard(mifare_tag *mft)
unsigned int i;
for (i = 0; i < 3; i++) {
void *data = mft->amb[block_base+i].mbd.abtData;
+ /* first block of sector 3 is not a log record */
+ if (sect == 3 && i == 0)
+ continue;
dump_easy_log(data);
}
}
personal git repositories of Harald Welte. Your mileage may vary