summaryrefslogtreecommitdiff
path: root/libusb/os/windows_winusb.h
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@google.com>2021-07-20 09:31:06 -0600
committerNathan Hjelm <hjelmn@cs.unm.edu>2021-07-21 10:03:59 -0600
commit6cae9c6dbd74c0840848f343dd605c5ddcef1ad1 (patch)
tree05ab9c50bbafcf66d00f866f99a31126aa2866a3 /libusb/os/windows_winusb.h
parentb0fd4d873e224bbb1985971834d31d956080c7a4 (diff)
downloadlibusb-6cae9c6dbd74c0840848f343dd605c5ddcef1ad1.tar.gz
core: update usbi_dbg to take the context as an argument
This commit fixes a performance issue caused by the disconnection of the first context allocated from the default context. usbi_dbg now takes the explicit context instead of relying on the default context (which may not exist) in most cases. All call sites have been updated to pass the context or explicitly pass NULL if the context is not available. We should actively discourage using NULL as the context in the future and patch all call sites to always pass the context. Fixes #951 Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'libusb/os/windows_winusb.h')
-rw-r--r--libusb/os/windows_winusb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h
index 6646dc7..6afd5cb 100644
--- a/libusb/os/windows_winusb.h
+++ b/libusb/os/windows_winusb.h
@@ -96,7 +96,7 @@ struct windows_usb_api_backend {
extern const struct windows_usb_api_backend usb_api_backend[USB_API_MAX];
#define PRINT_UNSUPPORTED_API(fname) \
- usbi_dbg("unsupported API call for '%s' " \
+ usbi_dbg(NULL, "unsupported API call for '%s' " \
"(unrecognized device driver)", #fname)
#define CHECK_SUPPORTED_API(apip, fname) \