Skip to content

Commit

Permalink
Merge pull request espressif#434 from david-cermak/bugfix/modem_examp…
Browse files Browse the repository at this point in the history
…les_print_netif

fix(modem): Fixed examples to show netif on ppp-changed event
  • Loading branch information
david-cermak authored Nov 16, 2023
2 parents cc40cc1 + a70b197 commit 7faa974
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ static void on_ppp_changed(void *arg, esp_event_base_t event_base,
ESP_LOGI(TAG, "PPP state changed event %" PRIu32, event_id);
if (event_id == NETIF_PPP_ERRORUSER) {
/* User interrupted event from esp-netif */
esp_netif_t *netif = event_data;
ESP_LOGI(TAG, "User interrupted event from netif:%p", netif);
esp_netif_t **p_netif = event_data;
ESP_LOGI(TAG, "User interrupted event from netif:%p", *p_netif);
}
}

Expand Down
4 changes: 2 additions & 2 deletions components/esp_modem/test/target/main/pppd_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ static void on_ppp_changed(void *arg, esp_event_base_t event_base,
ESP_LOGI(TAG, "PPP state changed event %" PRId32, event_id);
if (event_id == NETIF_PPP_ERRORUSER) {
/* User interrupted event from esp-netif */
esp_netif_t *netif = static_cast<esp_netif_t *>(event_data);
ESP_LOGI(TAG, "User interrupted event from netif:%p", netif);
auto p_netif = static_cast<esp_netif_t **>(event_data);
ESP_LOGI(TAG, "User interrupted event from netif:%p", *p_netif);
xEventGroupSetBits(event_group, 2);
}
}
Expand Down

0 comments on commit 7faa974

Please sign in to comment.