From baf6beec2ecfd52f8038ffcb433514e545767f46 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 2 May 2018 19:51:10 +0200 Subject: [PATCH] chg: unified download --- client/cmddata.c | 6 +++--- client/cmdhffelica.c | 2 +- client/cmdhficlass.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index 1c67f7900..0cb45de64 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -805,7 +805,7 @@ int CmdBitsamples(const char *Cmd) int cnt = 0; uint8_t got[12288]; - if (!GetFromBigBuf(got, sizeof(got), 0, NULL, 2500 , false)) { + if (!GetFromDevice(BIG_BUF, got, sizeof(got), 0, NULL, 2500 , false)) { PrintAndLogEx(WARNING, "command execution time out"); return false; } @@ -1337,7 +1337,7 @@ int CmdHexsamples(const char *Cmd) return 0; } - if ( !GetFromBigBuf(got, requested, offset, NULL, 2500, false)) { + if ( !GetFromDevice(BIG_BUF, got, requested, offset, NULL, 2500, false)) { PrintAndLogEx(WARNING, "command execution time out"); return false; } @@ -1416,7 +1416,7 @@ int getSamples(int n, bool silent) { if (!silent) PrintAndLogEx(NORMAL, "Reading %d bytes from device memory\n", n); UsbCommand response; - if ( !GetFromBigBuf(got, n, 0, &response, 10000, true) ) { + if ( !GetFromDevice(BIG_BUF, got, n, 0, &response, 10000, true) ) { PrintAndLogEx(WARNING, "timeout while waiting for reply."); return 1; } diff --git a/client/cmdhffelica.c b/client/cmdhffelica.c index d216ae947..f7d8142ea 100644 --- a/client/cmdhffelica.c +++ b/client/cmdhffelica.c @@ -391,7 +391,7 @@ int CmdHFFelicaDumpLite(const char *Cmd) { // only download data if there is any. if ( tracelen > 0 ) { - if ( !GetFromBigBuf(trace, tracelen, 0, NULL, 2500, false) ){ + if ( !GetFromDevice(BIG_BUF, trace, tracelen, 0, NULL, 2500, false) ){ PrintAndLogEx(WARNING, "command execution time out"); free(trace); return 0; diff --git a/client/cmdhficlass.c b/client/cmdhficlass.c index 06e1a418a..372fa29d8 100644 --- a/client/cmdhficlass.c +++ b/client/cmdhficlass.c @@ -1066,7 +1066,7 @@ int CmdHFiClassReader_Dump(const char *Cmd) { } // response ok - now get bigbuf content of the dump - if ( !GetFromBigBuf(tag_data+(blockno*8), blocksRead*8, startindex, NULL, 2500, false) ) { + if ( !GetFromDevice(BIG_BUF, tag_data+(blockno*8), blocksRead*8, startindex, NULL, 2500, false) ) { PrintAndLogEx(WARNING, "command execution time out"); return 0; } @@ -1111,7 +1111,7 @@ int CmdHFiClassReader_Dump(const char *Cmd) { blocksRead = (sizeof(tag_data) - gotBytes)/8; } // get dumped data from bigbuf - if ( !GetFromBigBuf(tag_data + gotBytes, blocksRead * 8, startindex, NULL, 2500, false)) { + if ( !GetFromDevice(BIG_BUF, tag_data + gotBytes, blocksRead * 8, startindex, NULL, 2500, false)) { PrintAndLogEx(WARNING, "command execution time out"); return 0; }