fix: 修正IfaceCommon的bounds字段的锁使用问题&调度问题

- 中断上下文内用到的锁,在外面要irqsave.
- 把主线调度的pr应用到当前分支: https://github.com/DragonOS-Community/DragonOS/pull/1063

Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
longjin
2024-11-27 17:11:21 +00:00
parent 14c21430a5
commit b7495981f4
5 changed files with 22 additions and 29 deletions

View File

@ -17,6 +17,8 @@
#define DEFAULT_PAGE "/index.html"
static int request_counter = 0;
int security_check(char *path)
{
// 检查路径是否包含 ..
@ -214,7 +216,7 @@ int main(int argc, char const *argv[])
while (1)
{
printf("Waiting for a client...\n");
printf("[#%d] Waiting for a client...\n", request_counter++);
// 等待并接受客户端连接
if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t *)&addrlen)) < 0)