Revert "Lib: reading data too small to route to a socket now raises an error instead...
commit47c68804cbabb9fae8bfaf8b1c2158b13f5b6fe2
authorChris Frey <cdfrey@foursquare.net>
Fri, 8 Oct 2010 02:35:28 +0000 (7 22:35 -0400)
committerChris Frey <cdfrey@foursquare.net>
Fri, 8 Oct 2010 02:35:28 +0000 (7 22:35 -0400)
tree2dac0d2c3e2facec2bcbe8e0d4acb8c20dd11cbd
parent372524543ad7f796115b1747620a020942ac238e
Revert "Lib: reading data too small to route to a socket now raises an error instead of just being ignored."

This reverts commit c7685942140b123bf110e755ce11a97c3c6372f7.

It was discovered that it *is* possible for a BlackBerry to respond
with a 0 length USB packet in a bulk read, and it not be an error.
So this commit makes an invalid assumption and must be reverted.

From Toby Gray's email:

On Tue, Oct 05, 2010 at 11:29:47AM +0100, Toby Gray wrote:
> 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.

Conflicts:

src/error.cc
src/error.h
src/router.cc
src/error.cc
src/error.h
src/m_raw_channel.cc
src/router.cc
src/router.h