提交 091f1f52 编写于 作者: J Jason Wang 提交者: Stefan Hajnoczi

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: 6e99c631
       ("net/socket: Drop net_socket_can_send")
Signed-off-by: NJason Wang <jasowang@redhat.com>
Reviewed-by: NFam Zheng <famz@redhat.com>
Message-id: 1436259656-24263-1-git-send-email-jasowang@redhat.com
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 f73ca736
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册