]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Revert 455aa1e08 and c3767ed0eb
authorAnthony Liguori <aliguori@us.ibm.com>
Wed, 12 Sep 2012 19:34:07 +0000 (14:34 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 17 Sep 2012 15:18:48 +0000 (10:18 -0500)
    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>
qemu-char.c

index 767da938622cd7281efaab769a73cf822161e5ff..10d15049480aaed2e1f1d4d5480c0e2af464e632 100644 (file)
@@ -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;
     }
 }