diff options
author | Jason Wang <jasowang@redhat.com> | 2015-07-07 17:00:56 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-07-20 17:39:05 +0100 |
commit | 091f1f52963d7093ea578e4a05e67bc015b21192 (patch) | |
tree | 22678c6d204a9aa9db982545258f607510a3648f | |
parent | f73ca7363440240b7ee5ee7f7ddb1c64751efb54 (diff) | |
download | hqemu-091f1f52963d7093ea578e4a05e67bc015b21192.zip hqemu-091f1f52963d7093ea578e4a05e67bc015b21192.tar.gz |
socket: pass correct size in net_socket_send()
We should pass the size of packet instead of the remaining to
qemu_send_packet_async().
Fixes: 6e99c631f116221d169ea53953d91b8aa74d297a
("net/socket: Drop net_socket_can_send")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1436259656-24263-1-git-send-email-jasowang@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index c752696..b1e3b1c 100644 --- a/net/socket.c +++ b/net/socket.c @@ -213,7 +213,7 @@ static void net_socket_send(void *opaque) if (s->index >= s->packet_len) { s->index = 0; s->state = 0; - if (qemu_send_packet_async(&s->nc, s->buf, size, + if (qemu_send_packet_async(&s->nc, s->buf, s->packet_len, net_socket_send_completed) == 0) { net_socket_read_poll(s, false); break; |