mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-11 00:56:18 +00:00
Rerun usb_find_busses() and usb_find_devices() without recalling usb_init()
Fixes issue #252
This commit is contained in:
committed by
Philippe Teuwen
parent
03e1f23a40
commit
ebe6335fc1
@@ -43,9 +43,7 @@
|
|||||||
int usb_prepare(void)
|
int usb_prepare(void)
|
||||||
{
|
{
|
||||||
static bool usb_initialized = false;
|
static bool usb_initialized = false;
|
||||||
if (usb_initialized) {
|
if (!usb_initialized) {
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENVVARS
|
#ifdef ENVVARS
|
||||||
char *env_log_level = getenv("LIBNFC_LOG_LEVEL");
|
char *env_log_level = getenv("LIBNFC_LOG_LEVEL");
|
||||||
@@ -58,6 +56,7 @@ int usb_prepare(void)
|
|||||||
|
|
||||||
usb_init();
|
usb_init();
|
||||||
usb_initialized = true;
|
usb_initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
// usb_find_busses will find all of the busses on the system. Returns the
|
// usb_find_busses will find all of the busses on the system. Returns the
|
||||||
|
|||||||
Reference in New Issue
Block a user