Fix RF2500 support on OS/X.

This commit is contained in:
Daniel Beer 2010-08-11 13:01:18 +12:00
parent b32567d41e
commit 336da5d7ea
1 changed files with 7 additions and 1 deletions

View File

@ -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;
}