mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-22 21:14:50 +00:00
Don't use assert() in MeshService to guard queueing packets (#6388)
This commit is contained in:
parent
daa4186d65
commit
e722a97987
@ -309,7 +309,10 @@ void MeshService::sendToPhone(meshtastic_MeshPacket *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(toPhoneQueue.enqueue(p, 0));
|
if (toPhoneQueue.enqueue(p, 0) == false) {
|
||||||
|
LOG_CRIT("Failed to queue a packet into toPhoneQueue!");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
fromNum++;
|
fromNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +326,10 @@ void MeshService::sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage
|
|||||||
releaseMqttClientProxyMessageToPool(d);
|
releaseMqttClientProxyMessageToPool(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(toPhoneMqttProxyQueue.enqueue(m, 0));
|
if (toPhoneMqttProxyQueue.enqueue(m, 0) == false) {
|
||||||
|
LOG_CRIT("Failed to queue a packet into toPhoneMqttProxyQueue!");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
fromNum++;
|
fromNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,7 +343,10 @@ void MeshService::sendClientNotification(meshtastic_ClientNotification *n)
|
|||||||
releaseClientNotificationToPool(d);
|
releaseClientNotificationToPool(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(toPhoneClientNotificationQueue.enqueue(n, 0));
|
if (toPhoneClientNotificationQueue.enqueue(n, 0) == false) {
|
||||||
|
LOG_CRIT("Failed to queue a notification into toPhoneClientNotificationQueue!");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
fromNum++;
|
fromNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user