openbsd-ports/devel/mspdebug/patches/patch-olimex_c
2011-09-06 20:36:24 +00:00

19 lines
602 B
Plaintext

$OpenBSD: patch-olimex_c,v 1.5 2011/09/06 20:36:24 jasper Exp $
From 7a0a30f62665ba85fa6e74ec3d9541bcafec34ad Mon Sep 17 00:00:00 2001
From: Daniel Beer <dlbeer@gmail.com>
Date: Wed, 7 Sep 2011 08:18:00 +1200
Subject: [PATCH] usb_bulk_read: may return 0 on timeout.
--- olimex.c.orig Wed Aug 24 06:24:16 2011
+++ olimex.c Tue Sep 6 22:35:25 2011
@@ -272,7 +272,7 @@ transport_t olimex_open(const char *devpath, const cha
/* Flush out lingering data */
while (usb_bulk_read(tr->handle, tr->in_ep,
buf, sizeof(buf),
- 100) >= 0);
+ 100) > 0);
return (transport_t)tr;
}