chg: 'trace list' - getfrombigbuf has now timeout

This commit is contained in:
iceman1001 2018-04-27 16:45:49 +02:00
parent fec833de03
commit a42580317c

View file

@ -485,7 +485,7 @@ int CmdTraceList(const char *Cmd) {
}
if ( isOnline ) {
// Query for the size of the trace
// Query for the size of the trace, downloading USB_CMD_DATA_SIZE
UsbCommand response;
GetFromBigBuf(trace, USB_CMD_DATA_SIZE, 0);
if ( !WaitForResponseTimeout(CMD_ACK, &response, 4000) ) {
@ -503,7 +503,11 @@ int CmdTraceList(const char *Cmd) {
}
trace = p;
GetFromBigBuf(trace, traceLen, 0);
WaitForResponse(CMD_ACK, NULL);
if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {
PrintAndLogEx(WARNING, "command execution time out");
free(trace);
return 3;
}
}
}