diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-09-12 14:34:07 -0500 |
---|---|---|
committer | Doug Goldstein <cardoe@cardoe.com> | 2012-11-13 22:50:02 -0600 |
commit | fa0a2a673a48335aaee5010a99716b6a0349a8ba (patch) | |
tree | 712367df402cb9fc7c9697734cf60ce5ab8f5286 | |
parent | configure: properly check if -lrt and -lm is needed (diff) | |
download | qemu-kvm-fa0a2a673a48335aaee5010a99716b6a0349a8ba.tar.gz qemu-kvm-fa0a2a673a48335aaee5010a99716b6a0349a8ba.tar.bz2 qemu-kvm-fa0a2a673a48335aaee5010a99716b6a0349a8ba.zip |
Revert 455aa1e08 and c3767ed0eb
commit c3767ed0eb5d0bb25fe409ae5dec06e3411ff1b6
qemu-char: (Re-)connect for tcp_chr_write() unconnected writing
Has no hope of working because tcp_chr_connect() does not actually connect.
455aa1e08 just fixes the SEGV with server() but the attempt to connect a client
socket is still completely broken.
This patch reverts both.
Reported-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 6db0fdce02d72546a4c47100a9b2cd0090cf464d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 57683d635420c8cd01e67db3b0129d9b143913b3)
-rw-r--r-- | qemu-char.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/qemu-char.c b/qemu-char.c index 767da9386..10d150494 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2141,18 +2141,13 @@ typedef struct { static void tcp_chr_accept(void *opaque); -static void tcp_chr_connect(void *opaque); - static int tcp_chr_write(CharDriverState *chr, const uint8_t *buf, int len) { TCPCharDriver *s = chr->opaque; if (s->connected) { return send_all(s->fd, buf, len); - } else if (s->listen_fd == -1) { - /* (Re-)connect for unconnected writing */ - tcp_chr_connect(chr); - return 0; } else { + /* XXX: indicate an error ? */ return len; } } |