sforkowany z mirror/meshtastic-android
fix #204 - throw error if sent message is too long
rodzic
6e2cb723ea
commit
5007019a2e
|
@ -1458,6 +1458,11 @@ class MeshService : Service(), Logging {
|
|||
// Keep a record of datapackets, so GUIs can show proper chat history
|
||||
rememberDataPacket(p)
|
||||
|
||||
if(p.bytes.size >= MeshProtos.Constants.DATA_PAYLOAD_LEN.number) {
|
||||
p.status = MessageStatus.ERROR
|
||||
throw RemoteException("Message too long")
|
||||
}
|
||||
|
||||
if (p.id != 0) { // If we have an ID we can wait for an ack or nak
|
||||
deleteOldPackets()
|
||||
sentPackets[p.id] = p
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a0b8d888961720d70ab7467c94d8fa0687e58020
|
||||
Subproject commit a36b31a43c53cab8e62ba04dfbb1fdcc9ecfe821
|
Ładowanie…
Reference in New Issue