Explorar o código

Fixed broken wifi.sta.{dis,}connect() with event mon enabled. (#2098)

Johny Mattsson %!s(int64=6) %!d(string=hai) anos
pai
achega
4a91464467
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/modules/wifi.c

+ 2 - 0
app/modules/wifi.c

@@ -979,6 +979,7 @@ static int wifi_station_connect4lua( lua_State* L )
   if(lua_isfunction(L, 1)){
   if(lua_isfunction(L, 1)){
     lua_pushnumber(L, EVENT_STAMODE_CONNECTED);
     lua_pushnumber(L, EVENT_STAMODE_CONNECTED);
     lua_pushvalue(L, 1);
     lua_pushvalue(L, 1);
+    lua_remove(L, 1);
     wifi_event_monitor_register(L);
     wifi_event_monitor_register(L);
   }
   }
 #endif
 #endif
@@ -993,6 +994,7 @@ static int wifi_station_disconnect4lua( lua_State* L )
   if(lua_isfunction(L, 1)){
   if(lua_isfunction(L, 1)){
     lua_pushnumber(L, EVENT_STAMODE_DISCONNECTED);
     lua_pushnumber(L, EVENT_STAMODE_DISCONNECTED);
     lua_pushvalue(L, 1);
     lua_pushvalue(L, 1);
+    lua_remove(L, 1);
     wifi_event_monitor_register(L);
     wifi_event_monitor_register(L);
   }
   }
 #endif
 #endif