1818#include "esp_netif.h"
1919
2020#ifdef CONFIG_LWIP_TCPIP_CORE_LOCKING
21- #include "lwip/priv/tcpip_priv.h"
21+ #include "lwip/priv/tcpip_priv.h"
2222#endif
2323
2424static void setTimeZone (long offset , int daylight ) {
@@ -56,8 +56,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
5656 }
5757
5858#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 )) {
6060 LOCK_TCPIP_CORE ();
61+ }
6162#endif
6263
6364 sntp_setoperatingmode (SNTP_OPMODE_POLL );
@@ -67,8 +68,9 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char *server1,
6768 sntp_init ();
6869
6970#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 )) {
7172 UNLOCK_TCPIP_CORE ();
73+ }
7274#endif
7375
7476 setTimeZone (- gmtOffset_sec , daylightOffset_sec );
@@ -86,8 +88,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
8688 }
8789
8890#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 )) {
9092 LOCK_TCPIP_CORE ();
93+ }
9194#endif
9295
9396 sntp_setoperatingmode (SNTP_OPMODE_POLL );
@@ -97,8 +100,9 @@ void configTzTime(const char *tz, const char *server1, const char *server2, cons
97100 sntp_init ();
98101
99102#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 )) {
101104 UNLOCK_TCPIP_CORE ();
105+ }
102106#endif
103107
104108 setenv ("TZ" , tz , 1 );
0 commit comments