mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-14 03:03:14 +08:00
CHG: 'hf list' - now gets a timeout instead of stalling if device doesnt answer..
This commit is contained in:
parent
834a80dcc1
commit
c567aecb2e
1 changed files with 5 additions and 1 deletions
|
@ -833,7 +833,11 @@ int CmdHFList(const char *Cmd) {
|
||||||
// Query for the size of the trace
|
// Query for the size of the trace
|
||||||
UsbCommand response;
|
UsbCommand response;
|
||||||
GetFromBigBuf(trace, USB_CMD_DATA_SIZE, 0);
|
GetFromBigBuf(trace, USB_CMD_DATA_SIZE, 0);
|
||||||
WaitForResponse(CMD_ACK, &response);
|
if ( !WaitForResponseTimeout(CMD_ACK, &response, 4000) ) {
|
||||||
|
PrintAndLog("timeout while waiting for reply.");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t traceLen = response.arg[2];
|
uint16_t traceLen = response.arg[2];
|
||||||
if (traceLen > USB_CMD_DATA_SIZE) {
|
if (traceLen > USB_CMD_DATA_SIZE) {
|
||||||
uint8_t *p = realloc(trace, traceLen);
|
uint8_t *p = realloc(trace, traceLen);
|
||||||
|
|
Loading…
Reference in a new issue