mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
only store advblob when adding/updating contacts
This commit is contained in:
parent
e6e1b810f8
commit
31ba971c60
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,6 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||||
plen = packet->writeTo(temp_buf);
|
plen = packet->writeTo(temp_buf);
|
||||||
packet->header = save;
|
packet->header = save;
|
||||||
}
|
}
|
||||||
putBlobByKey(id.pub_key, PUB_KEY_SIZE, temp_buf, plen);
|
|
||||||
|
|
||||||
bool is_new = false; // true = not in contacts[], false = exists in contacts[]
|
bool is_new = false; // true = not in contacts[], false = exists in contacts[]
|
||||||
if (from == NULL) {
|
if (from == NULL) {
|
||||||
|
|
@ -157,6 +156,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||||
from->shared_secret_valid = false;
|
from->shared_secret_valid = false;
|
||||||
}
|
}
|
||||||
// update
|
// update
|
||||||
|
putBlobByKey(id.pub_key, PUB_KEY_SIZE, temp_buf, plen);
|
||||||
StrHelper::strncpy(from->name, parser.getName(), sizeof(from->name));
|
StrHelper::strncpy(from->name, parser.getName(), sizeof(from->name));
|
||||||
from->type = parser.getType();
|
from->type = parser.getType();
|
||||||
if (parser.hasLatLon()) {
|
if (parser.hasLatLon()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue