From 7a62ac2f4a87482287813643ec0e0aa4534e9dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Wed, 28 Aug 2024 15:29:56 -0400 Subject: [PATCH] Ensuring we use the right core count, fixing a typo on the HTTP method check --- src/hal/support.c | 4 ++-- src/server.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hal/support.c b/src/hal/support.c index 26f4f22..a9d4645 100644 --- a/src/hal/support.c +++ b/src/hal/support.c @@ -105,7 +105,7 @@ void hal_identify(void) { if (package[2] == 'A') strcpy(chip, "SSC33[8/9]G"); else { - if (sysconf(_SC_NPROCESSORS_ONLN) == 1) + if (sysconf(_SC_NPROCESSORS_CONF) == 1) strcpy(chip, "SSC30K"); else strcpy(chip, "SSC33[6/8]"); @@ -287,7 +287,7 @@ void hal_identify(void) { #endif #if defined(__riscv) || defined(__riscv__) - if (!access("/proc/cvi", F_OK)) { + if (!access("/proc/cvi", F_OK)) { plat = HAL_PLATFORM_CVI; strcpy(family, "CV181x"); chnCount = CVI_VENC_CHN_NUM; diff --git a/src/server.c b/src/server.c index 256b57b..e58e668 100644 --- a/src/server.c +++ b/src/server.c @@ -522,7 +522,7 @@ void *server_thread(void *vargp) { parse_request(client_fd, request); - if (!EQUALS(method, "GET") || !EQUALS(method, "POST")) { + if (!EQUALS(method, "GET") && !EQUALS(method, "POST")) { send_and_close(client_fd, (char*)error405, strlen(error405)); continue; }