diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/filter-mirror.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 1b6211b2a2..e8e5b60f25 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirror.c @@ -43,7 +43,7 @@ typedef struct MirrorState { SocketReadState rs; } MirrorState; -static int filter_send(CharBackend *chr_out, +static int filter_send(MirrorState *s, const struct iovec *iov, int iovcnt) { @@ -58,14 +58,14 @@ static int filter_send(CharBackend *chr_out, } len = htonl(size); - ret = qemu_chr_fe_write_all(chr_out, (uint8_t *)&len, sizeof(len)); + ret = qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)&len, sizeof(len)); if (ret != sizeof(len)) { goto err; } buf = g_malloc(size); iov_to_buf(iov, iovcnt, 0, buf, size); - ret = qemu_chr_fe_write_all(chr_out, (uint8_t *)buf, size); + ret = qemu_chr_fe_write_all(&s->chr_out, (uint8_t *)buf, size); g_free(buf); if (ret != size) { goto err; @@ -141,7 +141,7 @@ static ssize_t filter_mirror_receive_iov(NetFilterState *nf, MirrorState *s = FILTER_MIRROR(nf); int ret; - ret = filter_send(&s->chr_out, iov, iovcnt); + ret = filter_send(s, iov, iovcnt); if (ret) { error_report("filter mirror send failed(%s)", strerror(-ret)); } @@ -164,7 +164,7 @@ static ssize_t filter_redirector_receive_iov(NetFilterState *nf, int ret; if (qemu_chr_fe_backend_connected(&s->chr_out)) { - ret = filter_send(&s->chr_out, iov, iovcnt); + ret = filter_send(s, iov, iovcnt); if (ret) { error_report("filter redirector send failed(%s)", strerror(-ret)); } |