qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spice: return unspecified address according to protocol
@ 2014-05-09 16:39 Amos Kong
  2014-05-12  9:34 ` Gerd Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: Amos Kong @ 2014-05-09 16:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: djasa, kraxel

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 <akong@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-12 12:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 16:39 [Qemu-devel] [PATCH] spice: return unspecified address according to protocol Amos Kong
2014-05-12  9:34 ` Gerd Hoffmann
2014-05-12 10:06   ` Amos Kong
2014-05-12 12:38     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).