Merge branch 'bugfix/modem_ppp_close_fix' into 'master'

esp_modem: post PPP stop event when requested

Closes IDFGH-2557

See merge request espressif/esp-idf!7528
pull/2405/merge
Angus Gratton 2020-02-11 12:05:44 +08:00
commit 2e8a894ea7
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -478,6 +478,10 @@ esp_err_t esp_modem_stop_ppp(modem_dte_t *dte)
{
modem_dce_t *dce = dte->dce;
MODEM_CHECK(dce, "DTE has not yet bind with DCE", err);
esp_modem_dte_t *esp_dte = __containerof(dte, esp_modem_dte_t, parent);
/* post PPP mode stopped event */
esp_event_post_to(esp_dte->event_loop_hdl, ESP_MODEM_EVENT, ESP_MODEM_EVENT_PPP_STOP, NULL, 0, 0);
/* Enter command mode */
MODEM_CHECK(dte->change_mode(dte, MODEM_COMMAND_MODE) == ESP_OK, "enter command mode failed", err);
/* Hang up */