[PATCH 2/2] qemu: fix hotplug of udp device with no connect host

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

 



Use an empty string to let qemu fill out the default.

https://bugzilla.redhat.com/show_bug.cgi?id=1454671
---
 src/qemu/qemu_monitor_json.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 63b855920..c63d250d3 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -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)
-- 
2.13.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux