]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: fix reconnect of unix socket is wrong
authorZhenguo Yao <yaozhenguo1@gmail.com>
Thu, 16 Feb 2023 02:48:37 +0000 (10:48 +0800)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 21 Feb 2023 16:58:00 +0000 (10:58 -0600)
'reconnect' parameter doesn't pass to qemu properly when
hotplug vhost-user device to vm. Fix this by making
'reconnect' to get correct value.

Signed-off-by: Zhenguo Yao <yaozhenguo1@gmail.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
src/qemu/qemu_monitor_json.c

index d05ca2932ff00cb499d495ff0180d21663f0cec7..ba6276ec8e425a128ea3f4afa5ad8382c19d2e0b 100644 (file)
@@ -6450,7 +6450,7 @@ qemuMonitorJSONAttachCharDevGetProps(const char *chrID,
                     return NULL;
 
                 if (chr->data.nix.reconnect.enabled == VIR_TRISTATE_BOOL_YES)
-                    reconnect = chr->data.tcp.reconnect.timeout;
+                    reconnect = chr->data.nix.reconnect.timeout;
                 else if (chr->data.nix.reconnect.enabled == VIR_TRISTATE_BOOL_NO)
                     reconnect = 0;
             }