Retain and isolate delayed Companion results under backpressure
This commit is contained in:
1 parent
94daaf7e40
commit
2e84512ba4
20 files changed
+1798
-340
No files matched your search
@@ -819,6 +819,7 @@ int BaseChatMesh::sendAnonReq(const ContactInfo& recipient, const uint8_t* data,
|
||||
{
|
||||
uint8_t temp[MAX_PACKET_PAYLOAD];
|
||||
tag = getRTCClock()->getCurrentTimeUnique();
|
||||
if (!allowRequestTag(tag)) return MSG_SEND_FAILED;
|
||||
memcpy(temp, &tag, 4); // tag to match later (also extra blob to help make packet_hash unique)
|
||||
memcpy(&temp[4], data, len);
|
||||
|
||||
@@ -846,6 +847,7 @@ int BaseChatMesh::sendRequest(const ContactInfo& recipient, const uint8_t* req_
|
||||
{
|
||||
uint8_t temp[MAX_PACKET_PAYLOAD];
|
||||
tag = getRTCClock()->getCurrentTimeUnique();
|
||||
if (!allowRequestTag(tag)) return MSG_SEND_FAILED;
|
||||
memcpy(temp, &tag, 4); // mostly an extra blob to help make packet_hash unique
|
||||
memcpy(&temp[4], req_data, data_len);
|
||||
|
||||
@@ -871,6 +873,7 @@ int BaseChatMesh::sendRequest(const ContactInfo& recipient, uint8_t req_type, u
|
||||
{
|
||||
uint8_t temp[13];
|
||||
tag = getRTCClock()->getCurrentTimeUnique();
|
||||
if (!allowRequestTag(tag)) return MSG_SEND_FAILED;
|
||||
memcpy(temp, &tag, 4); // mostly an extra blob to help make packet_hash unique
|
||||
temp[4] = req_type;
|
||||
memset(&temp[5], 0, 4); // reserved (possibly for 'since' param)
|
||||
|
||||
Reference in new issue
Block a user