summaryrefslogtreecommitdiffstats
path: root/src/libusbmuxd.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-07-14 03:20:23 +0200
committerGravatar Nikias Bassen2016-07-14 03:20:23 +0200
commit73d35f2caf7c26a79ade3ff830dbb71197af26af (patch)
tree101a28a133c86e6d3b6599592317ca88d9f7c84e /src/libusbmuxd.c
parentfc9e1764ae65b9420bc1bf8e26307c21f542357b (diff)
downloadlibusbmuxd-73d35f2caf7c26a79ade3ff830dbb71197af26af.tar.gz
libusbmuxd-73d35f2caf7c26a79ade3ff830dbb71197af26af.tar.bz2
win32: Return WaitForSingleObject error code in usbmuxd_unsubscribe
Similar to the previous commit, WaitForSingleObject may return an error code. While not sure how to handle this error we return it to the caller of usbmuxd_unsubscribe.
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r--src/libusbmuxd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 2897da6..485857b 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -813,7 +813,10 @@ USBMUXD_API int usbmuxd_unsubscribe()
#ifdef WIN32
if (devmon != NULL) {
- WaitForSingleObject(devmon, INFINITE);
+ res = WaitForSingleObject(devmon, INFINITE);
+ if (res != 0) {
+ return res;
+ }
}
#else
res = pthread_kill(devmon, 0);