mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-14 11:18:41 +01:00
rename g_port to g_httpPort for Simulator
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user