From fec833de03d96b51e48f053e1a345b95c1981834 Mon Sep 17 00:00:00 2001
From: iceman1001 <iceman@iuse.se>
Date: Fri, 27 Apr 2018 16:45:02 +0200
Subject: [PATCH] chg: 'lf t55 resetread'   -  getfrombigbuf has now timeout
 chg: 'lf t55 '   - (aquiredata)  getfrombigbuf has now timeout

---
 client/cmdlft55xx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c
index 7f6c6ac93..f6a2bf5e3 100644
--- a/client/cmdlft55xx.c
+++ b/client/cmdlft55xx.c
@@ -1310,7 +1310,7 @@ bool AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password ){
 	//uint8_t got[12288];
 	uint8_t got[7679];
 	GetFromBigBuf(got, sizeof(got), 0);
-	if ( !WaitForResponseTimeout(CMD_ACK, NULL, 8000) ) {
+	if ( !WaitForResponseTimeout(CMD_ACK, NULL, 6000) ) {
 		PrintAndLogEx(WARNING, "command execution time out");
 		return false;
 	}
@@ -1442,8 +1442,11 @@ int CmdResetRead(const char *Cmd) {
 	}
 
 	uint8_t got[BIGBUF_SIZE-1];
-	GetFromBigBuf(got,sizeof(got),0);
-	WaitForResponse(CMD_ACK,NULL);
+	GetFromBigBuf(got, sizeof(got), 0);
+	if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {
+		PrintAndLogEx(WARNING, "command execution time out");
+		return 0;
+	}
 	setGraphBuf(got, sizeof(got));
 	return 1;
 }