Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f41beb9

Browse filesBrowse files
lbernstoneme-no-dev
authored andcommitted
Fixed so configTime will not crash if tcpip is not initialized (espressif#3470)
1 parent 8c4ca5a commit f41beb9
Copy full SHA for f41beb9

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎cores/esp32/esp32-hal-time.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-time.c
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "esp32-hal.h"
1616
#include "lwip/apps/sntp.h"
17+
#include "tcpip_adapter.h"
1718

1819
static void setTimeZone(long offset, int daylight)
1920
{
@@ -45,6 +46,7 @@ static void setTimeZone(long offset, int daylight)
4546
* */
4647
void configTime(long gmtOffset_sec, int daylightOffset_sec, const char* server1, const char* server2, const char* server3)
4748
{
49+
tcpip_adapter_init(); // Should not hurt anything if already inited
4850
if(sntp_enabled()){
4951
sntp_stop();
5052
}
@@ -62,6 +64,7 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char* server1,
6264
* */
6365
void configTzTime(const char* tz, const char* server1, const char* server2, const char* server3)
6466
{
67+
tcpip_adapter_init(); // Should not hurt anything if already inited
6568
if(sntp_enabled()){
6669
sntp_stop();
6770
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.