aboutsummaryrefslogtreecommitdiff
path: root/tap-win32.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-05-18 13:40:55 +0100
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commit4f1c942b7fb29864ad86cb3af9076da38f38f74e (patch)
tree2f51a121e715476c3986c0ae0b4513be555d8ee8 /tap-win32.c
parente3f5ec2b5e92706e3b807059f79b1fb5d936e567 (diff)
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 <markmc@redhat.com>
Diffstat (limited to 'tap-win32.c')
-rw-r--r--tap-win32.c6
1 files changed, 3 insertions, 3 deletions
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)