Commit d2d7a7468e90ecbd37eeabd9399880d929d78767

Con Kolivas 2013-10-14T00:54:39

Merge branch 'master' into hashfast

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/usbutils.c b/usbutils.c
index f865a36..03fac7d 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2272,6 +2272,7 @@ static int callback_wait(struct usb_transfer *ut, int *transferred, unsigned int
 		libusb_cancel_transfer(transfer);
 
 		/* Now wait for the callback function to be invoked. */
+		mutex_lock(&ut->mutex);
 		pthread_cond_wait(&ut->cond, &ut->mutex);
 	}
 	ret = transfer->status;