Merge "Bluetooth OBEX timeout problem."

This commit is contained in:
Jaikumar Ganesh
2010-10-27 16:18:07 -07:00
committed by Android (Google) Code Review

View File

@@ -397,11 +397,13 @@ public final class ServerOperation implements Operation, BaseStream {
&& (headerID != ObexHelper.OBEX_OPCODE_GET_FINAL)) {
if (length > 3) {
byte[] temp = new byte[length];
byte[] temp = new byte[length - 3];
// First three bytes already read, compensating for this
bytesReceived = mInput.read(temp);
while (bytesReceived != length) {
bytesReceived += mInput.read(temp, bytesReceived, length - bytesReceived);
while (bytesReceived != temp.length) {
bytesReceived += mInput.read(temp, bytesReceived,
temp.length - bytesReceived);
}
}