qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v2 2/7] char-socket: correctly set has_reconnect when


From: Marc-André Lureau
Subject: [Qemu-devel] [PULL v2 2/7] char-socket: correctly set has_reconnect when parsing QemuOpts
Date: Thu, 1 Nov 2018 12:24:18 +0400

qemu_chr_parse_socket() fills all ChardevSocket fields, but that
doesn't reflect correctly the arguments given with the options / on
the command line. "reconnect" takes a number as argument, and the
default value is 0, which doesn't help to identify the missing
option. The other arguments have default values that are less
problematic, leave them set by default for now.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
---
 chardev/char-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index a75b46d9fe..64e24cb2ab 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket.c
@@ -1117,7 +1117,7 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
     sock->tn3270 = is_tn3270;
     sock->has_wait = true;
     sock->wait = is_waitconnect;
-    sock->has_reconnect = true;
+    sock->has_reconnect = qemu_opt_find(opts, "reconnect");
     sock->reconnect = reconnect;
     sock->tls_creds = g_strdup(tls_creds);
 
-- 
2.19.1.708.g4ede3d42df




reply via email to

[Prev in Thread] Current Thread [Next in Thread]