summaryrefslogtreecommitdiff
path: root/kernel/queue.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-28 21:39:53 +0200
committerAnton Kling <anton@kling.gg>2024-04-28 21:40:39 +0200
commit507062d51b3e018fdfac838e7982ffe62ff423c5 (patch)
tree9ed18a03fd2c35329525872f2aabe2455a7a6236 /kernel/queue.c
parent7695cb9ca77a32aae75cf0d2bcea9769cd938615 (diff)
Kernel: Use ringbuffer for handling incoming socket data
Diffstat (limited to 'kernel/queue.c')
-rw-r--r--kernel/queue.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/queue.c b/kernel/queue.c
index 0bef21b..43b2400 100644
--- a/kernel/queue.c
+++ b/kernel/queue.c
@@ -65,8 +65,7 @@ int queue_should_block(struct event_queue *q, int *is_empty) {
} else if (EVENT_TYPE_TCP_SOCKET == ev->type) {
struct TcpConnection *con = tcp_get_connection(ev->internal_id, q->p);
assert(con);
- assert(con->data_file);
- if (con->data_file->has_data) {
+ if (!ringbuffer_isempty(&con->buffer)) {
return 0;
}
}