18
18
#include "esp_netif.h"
19
19
20
20
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
21
- #include "lwip/priv/tcpip_priv.h"
21
+ #include "lwip/priv/tcpip_priv.h"
22
22
#endif
23
23
24
24
static void setTimeZone (long offset , int daylight ) {
@@ -56,8 +56,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
56
56
}
57
57
58
58
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
59
- if (!sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER ))
59
+ if (!sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER )) {
60
60
LOCK_TCPIP_CORE ();
61
+ }
61
62
#endif
62
63
63
64
sntp_setoperatingmode (SNTP_OPMODE_POLL );
@@ -67,8 +68,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
67
68
sntp_init ();
68
69
69
70
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
70
- if (sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER ))
71
+ if (sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER )) {
71
72
UNLOCK_TCPIP_CORE ();
73
+ }
72
74
#endif
73
75
74
76
setTimeZone (- gmtOffset_sec , daylightOffset_sec );
@@ -86,8 +88,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
86
88
}
87
89
88
90
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
89
- if (!sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER ))
91
+ if (!sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER )) {
90
92
LOCK_TCPIP_CORE ();
93
+ }
91
94
#endif
92
95
93
96
sntp_setoperatingmode (SNTP_OPMODE_POLL );
@@ -97,8 +100,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
97
100
sntp_init ();
98
101
99
102
#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
100
- if (sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER ))
103
+ if (sys_thread_tcpip (LWIP_CORE_LOCK_QUERY_HOLDER )) {
101
104
UNLOCK_TCPIP_CORE ();
105
+ }
102
106
#endif
103
107
104
108
setenv ("TZ" , tz , 1 );
0 commit comments