From 7337d9e1d11064d12e1b966ac65791395e178485 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Fri, 13 Mar 2009 16:51:27 +0100 Subject: [PATCH] Ensure the send queue offset is calculated correctly in case of a partial queued write. Signed-off-by: Jan Vidar Krey --- src/netevent.c | 2 +- src/netevent.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/netevent.c b/src/netevent.c index 5127b80..c0d3a43 100644 --- a/src/netevent.c +++ b/src/netevent.c @@ -192,7 +192,7 @@ void net_on_write(int fd, short ev, void *arg) else { user->send_queue_size -= ret; - user->send_queue_offset -= ret; + user->send_queue_offset += ret; break; } } diff --git a/src/netevent.h b/src/netevent.h index 142f089..f238487 100644 --- a/src/netevent.h +++ b/src/netevent.h @@ -35,7 +35,6 @@ extern void net_on_write(int fd, short ev, void *arg); */ extern void net_on_read_timeout(int fd, short ev, void* arg); - /** * Network callback to accept incoming connections. */