]> git.ipfire.org Git - thirdparty/qemu.git/commit
socket: don't attempt to reconnect a TCP socket in server mode
authorAnthony Liguori <aliguori@us.ibm.com>
Wed, 5 Sep 2012 18:52:49 +0000 (13:52 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:58:30 +0000 (01:58 -0500)
commit5af6b07ab063a9d98f60965d1295cae444f257fc
treef017bb50299e411a97bd9252a8eb4b2ec9f3d2e7
parent82645b9e93c649a586fdd5248f267dea474663a4
socket: don't attempt to reconnect a TCP socket in server mode

Commit c3767ed0eb5d0bb25fe409ae5dec06e3411ff1b6 introduced a possible SEGV when
using a socket chardev with server=on because it assumes that all TCP sockets
are in client mode.

This patch adds a check to only reconnect when in client mode.

Cc: Lei Li <lilei@linux.vnet.ibm.com>
Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 455aa1e0818653c41fd794435b982426ce21ba2f)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-char.c