mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-04 09:17:29 +01:00
Mi Band 8: Fix chunked receive decryption
This commit is contained in:
parent
57c7a083aa
commit
4662da3b82
@ -148,6 +148,9 @@ public class XiaomiCharacteristic {
|
|||||||
} else {
|
} else {
|
||||||
handler.handle(chunkBuffer.toByteArray());
|
handler.handle(chunkBuffer.toByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentChunk = 0;
|
||||||
|
chunkBuffer.reset();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Not a chunk / single-packet
|
// Not a chunk / single-packet
|
||||||
@ -162,6 +165,8 @@ public class XiaomiCharacteristic {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
numChunks = buf.getShort();
|
numChunks = buf.getShort();
|
||||||
|
currentChunk = 0;
|
||||||
|
chunkBuffer.reset();
|
||||||
LOG.debug("Got chunked start request for {} chunks", numChunks);
|
LOG.debug("Got chunked start request for {} chunks", numChunks);
|
||||||
sendChunkStartAck();
|
sendChunkStartAck();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user