summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2016-07-07 11:38:22 +0200
committerGravatar Martin Szulecki2020-06-07 21:57:17 +0200
commite2f29ba553c24d6910d7ff1966c30677a7a3882d (patch)
treeaa080b1b4de5e68904d0caa4dec7c77a305c6fda /src
parent38844beff5f288b625720978c075600361919448 (diff)
downloadusbmuxd-e2f29ba553c24d6910d7ff1966c30677a7a3882d.tar.gz
usbmuxd-e2f29ba553c24d6910d7ff1966c30677a7a3882d.tar.bz2
Map debug to log levels and enable debug output for libusb
Diffstat (limited to 'src')
-rw-r--r--src/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usb.c b/src/usb.c
index bae5a4d..7b78b02 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -800,7 +800,9 @@ int usb_init(void)
devlist_failures = 0;
device_polling = 1;
res = libusb_init(NULL);
- //libusb_set_debug(NULL, 3);
+
+ libusb_set_debug(NULL, (log_level >= LL_DEBUG ? LIBUSB_LOG_LEVEL_DEBUG: (log_level >= LL_WARNING ? LIBUSB_LOG_LEVEL_WARNING: LIBUSB_LOG_LEVEL_NONE)));
+
if(res != 0) {
usbmuxd_log(LL_FATAL, "libusb_init failed: %d", res);
return -1;