Harden message retry replacement and seed testing channel
This commit is contained in:
1 parent
33cea30582
commit
26d6e0f99a
9 files changed
+369
-28
No files matched your search
@@ -449,7 +449,8 @@ mesh::Packet* BaseChatMesh::composeMsgPacket(const ContactInfo& recipient, uint3
|
||||
|
||||
int BaseChatMesh::sendMessage(const ContactInfo& recipient, uint32_t timestamp, uint8_t attempt, const char* text,
|
||||
uint32_t& expected_ack, uint32_t& est_timeout, uint8_t* packet_hash,
|
||||
const uint8_t* replace_retry_key) {
|
||||
const uint8_t* replace_retry_key,
|
||||
const uint8_t* message_retry_key) {
|
||||
mesh::Packet* pkt = composeMsgPacket(recipient, timestamp, attempt, text, expected_ack);
|
||||
if (pkt == NULL) return MSG_SEND_FAILED;
|
||||
if (packet_hash != NULL) {
|
||||
@@ -483,6 +484,9 @@ int BaseChatMesh::sendMessage(const ContactInfo& recipient, uint32_t timestamp,
|
||||
if (replace_retry_key != NULL) {
|
||||
replaceActiveRetries(pkt, replace_retry_key);
|
||||
}
|
||||
if (message_retry_key != NULL) {
|
||||
replaceActiveMessageRetries(pkt, message_retry_key, timestamp);
|
||||
}
|
||||
txt_send_timeout = futureMillis(est_timeout);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user