Skip to content

Commit

Permalink
Check running state after capture
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed May 24, 2024
1 parent 362a13e commit ad1ae36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/exploit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct Cookie {

#define CHECK_RET(value) { int ret = (value); if(ret != RETURN_SUCCESS) return ret;}
#define CHECK_RUNNING() if (!running) return RETURN_STOP
#define startBlockingCapture(cb) if(dev->startCaptureBlockingMode(cb, nullptr, this->timeout) != 1) { return running ? RETURN_FAIL : RETURN_STOP; }
#define startBlockingCaptureWithCookie(cb, cookie) if(dev->startCaptureBlockingMode(cb, cookie, this->timeout) != 1) { return running ? RETURN_FAIL : RETURN_STOP; }
#define startBlockingCaptureWithCookie(cb, cookie) if(dev->startCaptureBlockingMode(cb, cookie, this->timeout) != 1) return RETURN_FAIL; else CHECK_RUNNING()
#define startBlockingCapture(cb) startBlockingCaptureWithCookie(cb, nullptr)

static void cpuSleep(int ms) {
auto start = std::chrono::high_resolution_clock::now();
Expand Down

0 comments on commit ad1ae36

Please sign in to comment.