From 4f1c942b7fb29864ad86cb3af9076da38f38f74e Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 18 May 2009 13:40:55 +0100 Subject: net: add return value to packet receive handler This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin --- tap-win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tap-win32.c') diff --git a/tap-win32.c b/tap-win32.c index ff1e1ed5f4..ba93355a74 100644 --- a/tap-win32.c +++ b/tap-win32.c @@ -650,11 +650,11 @@ static void tap_cleanup(VLANClientState *vc) qemu_free(s); } -static void tap_receive(VLANClientState *vc, const uint8_t *buf, size_t size) +static ssize_t tap_receive(VLANClientState *vc, const uint8_t *buf, size_t size) { - TAPState *s = opaque; + TAPState *s = vc->opaque; - tap_win32_write(s->handle, buf, size); + return tap_win32_write(s->handle, buf, size); } static void tap_win32_send(void *opaque) -- cgit v1.2.3