Skip to content

Commit

Permalink
Remove request_exit() function.
Browse files Browse the repository at this point in the history
This just set the do_exit flag, and was now only called in one place.
  • Loading branch information
martinling committed Mar 18, 2022
1 parent c4789df commit 503cd33
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions host/libhackrf/src/hackrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ static int create_transfer_thread(hackrf_device* device);
static libusb_context* g_libusb_context = NULL;
int last_libusb_error = LIBUSB_SUCCESS;

static void request_exit(hackrf_device* device)
{
device->do_exit = true;
}

/*
* Check if the transfers are setup and owned by libusb.
*
Expand Down Expand Up @@ -1781,10 +1776,10 @@ static int kill_transfer_thread(hackrf_device* device)
* thread has handled all completion callbacks.
*/
cancel_transfers(device);
/*
* Now call request_exit() to halt the main loop.
*/
request_exit(device);

// Set flag to tell the thread to exit.
device->do_exit = true;

/*
* Interrupt the event handling thread instead of
* waiting for timeout.
Expand Down

0 comments on commit 503cd33

Please sign in to comment.