From 336da5d7ea773d69e3696697001f432c5927889b Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Wed, 11 Aug 2010 13:01:18 +1200 Subject: [PATCH] Fix RF2500 support on OS/X. --- rf2500.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rf2500.c b/rf2500.c index ac27dcd..73d4fbc 100644 --- a/rf2500.c +++ b/rf2500.c @@ -212,10 +212,16 @@ transport_t rf2500_open(const char *devpath) return NULL; } - /* Flush out lingering data */ + /* Flush out lingering data. + * + * The timeout apparently doesn't work on OS/X, and this loop + * just hangs once the endpoint buffer empties. + */ +#ifndef __APPLE__ while (usb_bulk_read(tr->handle, USB_FET_IN_EP, buf, sizeof(buf), 100) >= 0); +#endif return (transport_t)tr; }