summaryrefslogtreecommitdiff
path: root/usbredirhost/usbredirhost.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-07-13 17:09:08 +0200
committerHans de Goede <hdegoede@redhat.com>2011-07-13 17:09:08 +0200
commitfddae25521dd838b355d549b6d9d15a79ceaca5f (patch)
tree57781f1ae3dadced7ea3230eeda2c0d15f8c67a0 /usbredirhost/usbredirhost.h
parentd80e30cdd7f6aa44f93488e0578510a19ba7ad52 (diff)
usbredirhost: Wait for cancelled packets to complete on device close
This: -fixes a memleak where we would not free the transfer + transfer buffer for iso / int transfers -stops libusb from complaining there are still transfers pending on device close
Diffstat (limited to 'usbredirhost/usbredirhost.h')
-rw-r--r--usbredirhost/usbredirhost.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/usbredirhost/usbredirhost.h b/usbredirhost/usbredirhost.h
index a98072c..dfffdc1 100644
--- a/usbredirhost/usbredirhost.h
+++ b/usbredirhost/usbredirhost.h
@@ -58,7 +58,12 @@ struct usbredirhost *usbredirhost_open(
void *func_priv, const char *version, int verbose);
/* Close the usbredirhost, returning control of the device back to any
- host kernel drivers for it, freeing any allocated memory, etc. */
+ host kernel drivers for it, freeing any allocated memory, etc.
+
+ Note this function calls libusb_handle_events to "reap" cancelled
+ urbs before closing the libusb device handle. This means that if you
+ are using the same libusb context for other purposes your transfer complete
+ callbacks may get called! */
void usbredirhost_close(struct usbredirhost *host);
/* Call this whenever there is data ready for the usbredirhost to read from