提交 955caf17 编写于 作者: J Ján Tomko

qemu: fix hotplug of udp device with no connect host

Use an empty string to let qemu fill out the default.
This matches what's done in qemuBuildChrChardevStr.

https://bugzilla.redhat.com/show_bug.cgi?id=1454671Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 80740d9c
......@@ -6522,7 +6522,10 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
case VIR_DOMAIN_CHR_TYPE_UDP:
backend_type = "udp";
addr = qemuMonitorJSONBuildInetSocketAddress(chr->data.udp.connectHost,
host = chr->data.udp.connectHost;
if (!host)
host = "";
addr = qemuMonitorJSONBuildInetSocketAddress(host,
chr->data.udp.connectService);
if (!addr ||
virJSONValueObjectAppend(data, "remote", addr) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册