diff options
author | Marvin Borner | 2020-12-03 22:26:46 +0100 |
---|---|---|
committer | Marvin Borner | 2020-12-03 22:26:46 +0100 |
commit | cd2dbb2e146562c9e37c614bb09a24f7fbf135e0 (patch) | |
tree | 12605be6b6dfe837f1a2ebefef3cfbc1ed8536e5 /kernel/features/syscall.c | |
parent | d525526f52c76156c4b9ee5ee4f14ed0d06547bc (diff) |
Quite important network stuff
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r-- | kernel/features/syscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index 01720c5..9eb9f4b 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -102,8 +102,8 @@ void syscall_handler(struct regs *r) } case SYS_NET_CLOSE: { struct socket *s = (void *)r->ebx; - if (s->type == S_TCP && s->state == S_CONNECTED) { - proc_current()->state = PROC_SLEEPING; + int status = net_close(s); + if (!status) { proc_yield(r); return; } |