telepathy: fix read of large messages in transport
commit1e332ae86d9e28321347c8da1fead2c50b2a2ca3
authorStefan Becker <chemobejk@gmail.com>
Tue, 28 Aug 2012 19:25:25 +0000 (28 22:25 +0300)
committerStefan Becker <chemobejk@gmail.com>
Thu, 30 Aug 2012 19:04:32 +0000 (30 22:04 +0300)
tree6f063b4489e7a1ea8dc32cfe0c24da1ccf1f46bc
parentbe69d27dfb4ed953a1e9c4a7b2ce6130f9061970
telepathy: fix read of large messages in transport

If a message is larger than the currently allocated buffer, then the
input routine in the core will NOT consume any data. Thus we're setting
up the next read for 0 bytes which incorrectly lead to a server
disconnected situation.

If the next read would be for 0 bytes we increase the buffer before
kicking off the next read.

The code now completes a complete login scenario with the OCS server.
src/telepathy/telepathy-transport.c