Skip to content

Commit 9a7bd90

Browse files
committed
fix(esp_modem): Exit data mode only after state change
Previously, we set the notification also for event causing permature PPP mode exit
1 parent 4314c78 commit 9a7bd90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp_modem/src/esp_modem_netif.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void Netif::on_ppp_changed(void *arg, esp_event_base_t event_base,
2121
int32_t event_id, void *event_data)
2222
{
2323
auto *ppp = static_cast<Netif *>(arg);
24-
if (event_id < NETIF_PP_PHASE_OFFSET) {
24+
if (event_id > NETIF_PPP_ERRORNONE && event_id < NETIF_PP_PHASE_OFFSET) {
2525
ESP_LOGI("esp_modem_netif", "PPP state changed event %" PRId32, event_id);
2626
// only notify the modem on state/error events, ignoring phase transitions
2727
ppp->signal.set(PPP_EXIT);

0 commit comments

Comments
 (0)