From 41ce32234b8d96775fda33e8fad7fbe753e95e41 Mon Sep 17 00:00:00 2001 From: djb Date: Mon, 28 May 2018 13:49:05 +0200 Subject: [PATCH] Ping command needed to test device state: do not subject to long touch on last 5 login attempts --- src/commander.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commander.c b/src/commander.c index 880647b4..9e437409 100644 --- a/src/commander.c +++ b/src/commander.c @@ -1792,13 +1792,6 @@ static int commander_check_init(const char *encrypted_command) return DBB_ERROR; } - if (memory_report_access_err_count() >= COMMANDER_TOUCH_ATTEMPTS) { - if (touch_button_press(DBB_TOUCH_LONG) != DBB_TOUCHED) { - commander_fill_report(cmd_str(CMD_input), NULL, DBB_ERR_IO_TOUCH_BUTTON); - return DBB_ERROR; - } - } - if (!encrypted_command) { commander_access_err(DBB_ERR_IO_NO_INPUT, memory_access_err_count(DBB_ACCESS_ITERATE)); return DBB_ERROR; @@ -1828,6 +1821,13 @@ static int commander_check_init(const char *encrypted_command) yajl_tree_free(json_node); } + if (memory_report_access_err_count() >= COMMANDER_TOUCH_ATTEMPTS) { + if (touch_button_press(DBB_TOUCH_LONG) != DBB_TOUCHED) { + commander_fill_report(cmd_str(CMD_input), NULL, DBB_ERR_IO_TOUCH_BUTTON); + return DBB_ERROR; + } + } + // Force setting a password before processing any other command. if (!memory_report_erased()) { return DBB_OK;