X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fusb.c;h=35a3e80ed58cc7d340317b1aeea116ba4d1f2d83;hb=815685462fdab21a390b5aecc253b92753439f06;hp=ba56e864c12ccf64260e5d824f01655b24db78aa;hpb=b98b70222fd756784e7bb55a4d3356e0e3405679;p=libsigrok.git diff --git a/src/usb.c b/src/usb.c index ba56e864..35a3e80e 100644 --- a/src/usb.c +++ b/src/usb.c @@ -28,7 +28,7 @@ #include "libsigrok-internal.h" /* SR_CONF_CONN takes one of these: */ -#define CONN_USB_VIDPID "^([0-9a-z]{4})\\.([0-9a-z]{4})$" +#define CONN_USB_VIDPID "^([0-9a-fA-F]{4})\\.([0-9a-fA-F]{4})$" #define CONN_USB_BUSADDR "^(\\d+)\\.(\\d+)$" #define LOG_PREFIX "usb" @@ -134,10 +134,6 @@ static gboolean usb_source_dispatch(GSource *source, pollfd = g_ptr_array_index(usource->pollfds, i); revents |= pollfd->revents; } - if (revents != 0) - sr_spew("%s: revents 0x%.2X", __func__, revents); - else - sr_spew("%s: timed out", __func__); if (!callback) { sr_err("Callback not set, cannot dispatch event."); @@ -359,7 +355,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn) return NULL; } - if (bus > 64) { + if (bus > 255) { sr_err("Invalid bus specified: %d.", bus); return NULL; }