Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
98e428f1
Commit
98e428f1
authored
May 15, 2020
by
Terry Ellison
Committed by
Marcel Stör
Jun 09, 2020
Browse files
Update wifi..c to fix #3106
parent
75f1c64c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/wifi.c
View file @
98e428f1
...
@@ -438,7 +438,7 @@ void wifi_pmSleep_suspend_CB(void)
...
@@ -438,7 +438,7 @@ void wifi_pmSleep_suspend_CB(void)
{
{
lua_State
*
L
=
lua_getstate
();
// Get main Lua thread pointer
lua_State
*
L
=
lua_getstate
();
// Get main Lua thread pointer
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// Push suspend callback onto stack
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// Push suspend callback onto stack
luaL_unref
(
L
,
wifi_suspend_cb_ref
);
// remove suspend callback from LUA_REGISTRY
luaL_unref
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// remove suspend callback from LUA_REGISTRY
wifi_suspend_cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
wifi_suspend_cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
lua_call
(
L
,
0
,
0
);
// Execute suspend callback
lua_call
(
L
,
0
,
0
);
// Execute suspend callback
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment