Skip to content

Commit

Permalink
socket: pass correct size in net_socket_send()
Browse files Browse the repository at this point in the history
We should pass the size of packet instead of the remaining to
qemu_send_packet_async().

Fixes: 6e99c63
       ("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>
  • Loading branch information
jasowang authored and stefanhaRH committed Jul 20, 2015
1 parent f73ca73 commit 091f1f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/socket.c
Expand Up @@ -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;
Expand Down

0 comments on commit 091f1f5

Please sign in to comment.