mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
chg: 'lua scripting' - getfrombigbuf has now timeout
This commit is contained in:
parent
a42580317c
commit
511cae77f1
1 changed files with 9 additions and 2 deletions
|
@ -80,7 +80,14 @@ static int l_GetFromBigBuf(lua_State *L){
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFromBigBuf(data, len, startindex);
|
GetFromBigBuf(data, len, startindex);
|
||||||
WaitForResponse(CMD_ACK, NULL);
|
|
||||||
|
if ( !WaitForResponseTimeout(CMD_ACK, NULL, 2500) ) {
|
||||||
|
free(data);
|
||||||
|
lua_pushnil(L);
|
||||||
|
lua_pushstring(L,"command execution time out");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
//Push it as a string
|
//Push it as a string
|
||||||
lua_pushlstring(L,(const char *)data, len);
|
lua_pushlstring(L,(const char *)data, len);
|
||||||
if (data)
|
if (data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue