summaryrefslogtreecommitdiff
path: root/kernel/socket.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-22 18:34:00 +0100
committerAnton Kling <anton@kling.gg>2023-11-22 18:34:00 +0100
commitb3866b0442f55b97833981a99c601f2143d10315 (patch)
tree2b0ae716da1e0d22311ecb119cc8d5cb2bbed822 /kernel/socket.c
parent615fb35efa8b13b7109e6974f86b295238163ebc (diff)
Kernel/RTL8139/Networking fixes
This is just a commit containing multiple fixes since I am too lazy to split them up.
Diffstat (limited to 'kernel/socket.c')
-rw-r--r--kernel/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/socket.c b/kernel/socket.c
index 630c203..27342e0 100644
--- a/kernel/socket.c
+++ b/kernel/socket.c
@@ -86,6 +86,8 @@ handle_incoming_tcp_connection(u8 ip[4], u16 n_port, u16 dst_port) {
NULL /*create_directory*/, NULL /*get_vm_object*/, NULL /*truncate*/,
NULL /*stat*/);
+ tcp_connections[i].has_data_ptr = &inode->has_data;
+
vfs_fd_t *fd;
int n = vfs_create_fd(O_RDWR | O_NONBLOCK, 0, 0 /*is_tty*/, inode, &fd);
@@ -102,7 +104,6 @@ handle_incoming_tcp_connection(u8 ip[4], u16 n_port, u16 dst_port) {
// But it does not get freed since the reference count
// is still over zero.
fd->reference_count--;
- kprintf("connection sent to server\n");
return &tcp_connections[i];
}