summaryrefslogtreecommitdiff
path: root/libhw
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-15 20:34:01 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-19 20:15:27 -0700
commit643973b9158dc9efc819ac0989b0b247f44a8ae2 (patch)
treecdc8899cde06e35c6b2e1bc9c4542e60d9e57348 /libhw
parent1dd3b34b9117d4686a131047afc381ba15b8aac3 (diff)
libhw: hostnet: Fixes
Diffstat (limited to 'libhw')
-rw-r--r--libhw/host_net.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libhw/host_net.c b/libhw/host_net.c
index db31522..330ce85 100644
--- a/libhw/host_net.c
+++ b/libhw/host_net.c
@@ -175,6 +175,7 @@ static implements_net_stream_conn *hostnet_tcplist_accept(implements_net_stream_
listener->active_conn.vtable = &hostnet_tcp_conn_vtable;
listener->active_conn.fd = ret_connfd;
+ listener->active_conn.read_deadline_ns = 0;
return &listener->active_conn;
}
@@ -273,7 +274,7 @@ struct hostnet_pthread_write_args {
};
static void *hostnet_pthread_write(void *_args) {
- struct hostnet_pthread_read_args *args = _args;
+ struct hostnet_pthread_write_args *args = _args;
size_t done = 0;
while (done < args->count) {
ssize_t r = write(args->connfd, args->buf, args->count);
@@ -366,6 +367,7 @@ void hostnet_udp_conn_init(struct hostnet_udp_conn *self, uint16_t port) {
self->vtable = &hostnet_udp_conn_vtable;
self->fd = fd;
+ self->read_deadline_ns = 0;
}
/* UDP sendto() ***************************************************************/