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
c72d6083
Unverified
Commit
c72d6083
authored
Aug 27, 2021
by
Lukáš Voborský
Committed by
GitHub
Aug 27, 2021
Browse files
Fix crash in sntp.sync() (#3460)
parent
bc9cba24
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/sntp.c
View file @
c72d6083
...
@@ -806,7 +806,7 @@ static int sntp_sync (lua_State *L)
...
@@ -806,7 +806,7 @@ static int sntp_sync (lua_State *L)
}
else
if
(
server_count
==
0
)
{
}
else
if
(
server_count
==
0
)
{
lua_newtable
(
L
);
lua_newtable
(
L
);
struct
netif
*
iface
=
(
struct
netif
*
)
eagle_lwip_getif
(
0x00
);
struct
netif
*
iface
=
(
struct
netif
*
)
eagle_lwip_getif
(
0x00
);
if
(
iface
->
dhcp
&&
iface
->
dhcp
->
offered_ntp_addr
.
addr
)
{
if
(
iface
&&
iface
->
dhcp
&&
iface
->
dhcp
->
offered_ntp_addr
.
addr
)
{
ip_addr_t
ntp_addr
=
iface
->
dhcp
->
offered_ntp_addr
;
ip_addr_t
ntp_addr
=
iface
->
dhcp
->
offered_ntp_addr
;
lua_pushinteger
(
L
,
1
);
lua_pushinteger
(
L
,
1
);
lua_pushstring
(
L
,
inet_ntoa
(
ntp_addr
));
lua_pushstring
(
L
,
inet_ntoa
(
ntp_addr
));
...
...
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