diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-09-17 12:05:09 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-09-19 12:17:09 +0200 |
commit | 4644aeb79f97b819e4c750095d8320faf9ea6c38 (patch) | |
tree | be8710a7fc32bd4e90b6a8afd79bcf790d3d6aab /usbredirhost/usbredirhost.h | |
parent | 4b5d1381c3b18c5c6e33b727d83a70448c176a92 (diff) |
Make usbredir*_has_data_to_write return the write queue depth
Instead of only returning 0 or 1, this can be used for flowcontrol purposes.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'usbredirhost/usbredirhost.h')
-rw-r--r-- | usbredirhost/usbredirhost.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usbredirhost/usbredirhost.h b/usbredirhost/usbredirhost.h index 052416a..77fb8a2 100644 --- a/usbredirhost/usbredirhost.h +++ b/usbredirhost/usbredirhost.h @@ -129,10 +129,10 @@ enum { }; int usbredirhost_read_guest_data(struct usbredirhost *host); -/* If this returns true there is data queued to write to the usb-guest */ +/* This returns the number of usbredir packets queued up for writing */ int usbredirhost_has_data_to_write(struct usbredirhost *host); -/* Call this when usbredirhost_has_data_to_write returns true +/* Call this when usbredirhost_has_data_to_write returns > 0 returns 0 on success, -1 if a write error happened. If a write error happened, this function will retry writing any queued data on the next call, and will continue doing so until it has succeeded! */ |