qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] spice: return unspecified address according to prot


From: Amos Kong
Subject: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
Date: Sat, 10 May 2014 00:39:13 +0800

Commit 4f60af9a changed '0.0.0.0' to '*' to indicate unspecified
address.

"::" is used to indicate unspecified address in IPV6.

This patch returns different address for different protocol,
it's more meaningful for the protocol specification than returning '*'.

Signed-off-by: Amos Kong <address@hidden>
---
 ui/spice-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/spice-core.c b/ui/spice-core.c
index d10818a..929c405 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -533,7 +533,9 @@ SpiceInfo *qmp_query_spice(Error **errp)
     info->auth = g_strdup(auth);
 
     info->has_host = true;
-    info->host = g_strdup(addr ? addr : "*");
+    info->host = g_strdup(addr ? addr : (qemu_opt_get_bool(opts,
+                                                           "ipv6", 0)
+                                         ? "::" : "0.0.0.0"));
 
     info->has_compiled_version = true;
     major = (SPICE_SERVER_VERSION & 0xff0000) >> 16;
-- 
1.9.0




reply via email to

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