mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-28 15:20:39 +00:00
fix packet reading on android
This commit is contained in:
parent
76b4a2b4c3
commit
ed3a7d82f6
@ -73,10 +73,10 @@ public class SocketConnectionUnix extends SocketConnection {
|
||||
int channel = Util.readBt16(inHeader, 2);
|
||||
int len = Util.readBt16(inHeader, 4);
|
||||
|
||||
Util.readExactly(in, inPayload, 0, len);
|
||||
bytes_read = Util.readExactly(in, inPayload, 0, len);
|
||||
if (bytes_read != len) return null;
|
||||
|
||||
Packet packet = new Packet(packetType, channel ,inPayload, len);
|
||||
Packet packet = new Packet(packetType, channel, inPayload, len);
|
||||
return packet;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user