* Terminal Chat: new commands "card" and "import"
This commit is contained in:
@@ -157,8 +157,11 @@ void Dispatcher::checkSend() {
|
||||
|
||||
Packet* Dispatcher::obtainNewPacket() {
|
||||
auto pkt = _mgr->allocNew(); // TODO: zero out all fields
|
||||
if (pkt == NULL) n_full_events++;
|
||||
|
||||
if (pkt == NULL) {
|
||||
n_full_events++;
|
||||
} else {
|
||||
pkt->payload_len = pkt->path_len = 0;
|
||||
}
|
||||
return pkt;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
|
||||
|
||||
if (i > pkt->payload_len) {
|
||||
MESH_DEBUG_PRINTLN("Mesh::onRecvPacket(): incomplete advertisement packet");
|
||||
} else if (self_id.matches(id.pub_key)) {
|
||||
MESH_DEBUG_PRINTLN("Mesh::onRecvPacket(): receiving SELF advert packet");
|
||||
} else if (!_tables->hasSeen(pkt)) {
|
||||
uint8_t* app_data = &pkt->payload[i];
|
||||
int app_data_len = pkt->payload_len - i;
|
||||
|
||||
Reference in New Issue
Block a user