Fix: One more fix for disconnect detection
authorDenis Kenzior <denkenz@gmail.com>
Fri, 15 Jan 2010 16:24:01 +0000 (10:24 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 15 Jan 2010 16:24:01 +0000 (10:24 -0600)
commite8d18946b9de07c684ed06494f16900f887c5cd4
tree10699c55351a1df60978ff3c4c0ccf94ff23c757
parentaec5b8a44fa2fbece87441656eaf7ffb9a53fc6e
Fix: One more fix for disconnect detection

In situations where lots of data is generated by the remote side (e.g.
phonebook is being read) we can get our ring buffer filled up.  In this
case setting rbytes to zero first and then breaking out of the loop
leads to an erroneous disconnect detection.  The fix is to move setting
of rbytes after we know we still have some space.
gatchat/gatchat.c