From bce134b5100fb4434deb9e426c7407d8939c4c51 Mon Sep 17 00:00:00 2001 From: Johny Mattsson Date: Wed, 28 Jul 2021 16:19:02 +1000 Subject: [PATCH] Fixed incorrect event data in wifi.sta.on('got_ip') --- components/modules/wifi_sta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/modules/wifi_sta.c b/components/modules/wifi_sta.c index 5d32e43c..f0dd972d 100644 --- a/components/modules/wifi_sta.c +++ b/components/modules/wifi_sta.c @@ -112,8 +112,9 @@ static void sta_authmode (lua_State *L, const void *data) static void sta_got_ip (lua_State *L, const void *data) { - const esp_netif_ip_info_t *ip_info = - (const esp_netif_ip_info_t *)data; + const ip_event_got_ip_t *got_ip_info = + (const ip_event_got_ip_t *)data; + const esp_netif_ip_info_t *ip_info = &got_ip_info->ip_info; char ipstr[IP_STR_SZ] = { 0 }; ip4str_esp (ipstr, &ip_info->ip);