Fixed incorrect event data in wifi.sta.on('got_ip')

This commit is contained in:
Johny Mattsson 2021-07-28 16:19:02 +10:00
parent 758291693c
commit bce134b510
1 changed files with 3 additions and 2 deletions

View File

@ -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);