Re: [Barry-devel] [Patch] Fix for hang when closing a socket when a USB error has been seen
Status: Beta
Brought to you by:
ndprojects
From: Toby G. <tob...@re...> - 2010-10-05 10:29:55
|
On 30/09/2010 23:37, Chris Frey wrote: > On Wed, Sep 29, 2010 at 02:04:36PM +0100, Toby Gray wrote: > > >> I've made the changes in my github branch >> git://github.com/tobygray/barry.git in commit c7685942140b123bf110. Is >> that the sort of change you were thinking of? > This is better yes, and I've merged it. > > My main concern (and this might need another change) is that this fix > only works if the router is used. If threaded reads are not enabled, > then 0 size packets will behave as before. > > If this matters, we'll need an exception at a lower level... maybe > something like Usb::NoData or something. When performing testing with some additional devices, I've discovered that it is possible to receive zero sized reads from some BlackBerry devices. When using a Curve 8520 it seems to cause zero sized reads occasionally when it blanks or unblanks the screen. I think the only solution is to go back to the old behaviour of ignoring unroutable reads and just depend on the timeout on sending/receiving to pick up when the port has been reset. I've made this change in 44980b19653972369fdd, so that now there is just some debug logging when an unroutable read occurs. I'll carry on working through testing with the 20 or so BlackBerry devices we've got here and will let you know if I see any other issues. Regards, Toby |