mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-19 21:42:25 +02:00
fix(esp_modem): Exit data mode only after state change
Previously, we set the notification also for event causing permature PPP mode exit
This commit is contained in:
@ -21,7 +21,7 @@ void Netif::on_ppp_changed(void *arg, esp_event_base_t event_base,
|
|||||||
int32_t event_id, void *event_data)
|
int32_t event_id, void *event_data)
|
||||||
{
|
{
|
||||||
auto *ppp = static_cast<Netif *>(arg);
|
auto *ppp = static_cast<Netif *>(arg);
|
||||||
if (event_id < NETIF_PP_PHASE_OFFSET) {
|
if (event_id > NETIF_PPP_ERRORNONE && event_id < NETIF_PP_PHASE_OFFSET) {
|
||||||
ESP_LOGI("esp_modem_netif", "PPP state changed event %" PRId32, event_id);
|
ESP_LOGI("esp_modem_netif", "PPP state changed event %" PRId32, event_id);
|
||||||
// only notify the modem on state/error events, ignoring phase transitions
|
// only notify the modem on state/error events, ignoring phase transitions
|
||||||
ppp->signal.set(PPP_EXIT);
|
ppp->signal.set(PPP_EXIT);
|
||||||
|
Reference in New Issue
Block a user