Skip to content

Commit

Permalink
fix/add missing 'LIBUSB_CALL' at libusb callback 'hackrf_libusb_trans…
Browse files Browse the repository at this point in the history
…fer_callback'

this allows to remove function cast at prepare_transfers()
missing 'LIBUSB_CALL' produced problems in debugger with Visual Studio 2017

Signed-off-by: hayati ayguen <h_ayguen@web.de>
  • Loading branch information
hayguen committed Jun 18, 2017
1 parent 72a03cf commit e707e44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/libhackrf/src/hackrf.c
Expand Up @@ -1429,7 +1429,7 @@ static void* transfer_threadproc(void* arg)
return NULL;
}

static void hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
static void LIBUSB_CALL hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer)
{
hackrf_device* device = (hackrf_device*)usb_transfer->user_data;

Expand Down Expand Up @@ -1502,7 +1502,7 @@ static int create_transfer_thread(hackrf_device* device,

result = prepare_transfers(
device, endpoint_address,
(libusb_transfer_cb_fn)hackrf_libusb_transfer_callback
hackrf_libusb_transfer_callback
);

if( result != HACKRF_SUCCESS )
Expand Down

0 comments on commit e707e44

Please sign in to comment.