From 63ca4b62643f2aad3cb33ffa7f92a4f3c19182c6 Mon Sep 17 00:00:00 2001 From: Tester23 Date: Thu, 20 Jul 2023 13:02:27 +0200 Subject: [PATCH] rename g_port to g_httpPort for Simulator --- src/httpserver/http_tcp_server_nonblocking.c | 4 ++-- src/win_main.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/httpserver/http_tcp_server_nonblocking.c b/src/httpserver/http_tcp_server_nonblocking.c index 1408ae00b..40339b7da 100644 --- a/src/httpserver/http_tcp_server_nonblocking.c +++ b/src/httpserver/http_tcp_server_nonblocking.c @@ -10,7 +10,7 @@ SOCKET ListenSocket = INVALID_SOCKET; -int g_port = 80; +int g_httpPort = 80; int HTTPServer_Start() { @@ -30,7 +30,7 @@ int HTTPServer_Start() { } // Resolve the server address and port char service[6]; - snprintf(service, sizeof(service), "%u", g_port); + snprintf(service, sizeof(service), "%u", g_httpPort); iResult = getaddrinfo(NULL, service, &hints, &result); if ( iResult != 0 ) { diff --git a/src/win_main.c b/src/win_main.c index 3fe10048e..9b0d3ce60 100644 --- a/src/win_main.c +++ b/src/win_main.c @@ -28,7 +28,7 @@ int accum_time = 0; int win_frameNum = 0; // this time counter is simulated, I need this for unit tests to work int g_simulatedTimeNow = 0; -extern int g_port; +extern int g_httpPort; #define DEFAULT_FRAME_TIME 5 @@ -128,6 +128,8 @@ void SIM_ClearOBK(const char *flashPath) { } void Win_DoUnitTests() { + // this is slowest + Test_TuyaMCU_Basic(); Test_Battery(); Test_TuyaMCU_BatteryPowered(); Test_JSON_Lib(); @@ -177,8 +179,6 @@ void Win_DoUnitTests() { Test_Http(); Test_DeviceGroups(); - // this is slowest - Test_TuyaMCU_Basic(); @@ -230,7 +230,7 @@ int __cdecl main(int argc, char **argv) i++; if (i < argc && sscanf(argv[i], "%d", &value) == 1) { - g_port = value; + g_httpPort = value; } } else if (wal_strnicmp(argv[i] + 1, "w", 1) == 0) { i++;