On Mon, Oct 05, 2015 at 04:16:42PM +0200, Wolfgang Bumiller wrote: > Signed-off-by: Wolfgang Bumiller <w.bumiller@xxxxxxxxxxx> > --- > src/spice-session.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/src/spice-session.c b/src/spice-session.c > index e1d9997..86c339f 100644 > --- a/src/spice-session.c > +++ b/src/spice-session.c > @@ -399,8 +399,15 @@ static gchar* spice_uri_create(SpiceSession *session) > > GString *str = g_string_new(URI_SCHEME_SPICE); > > - g_string_append(str, s->host); > - g_string_append(str, "?"); > + /* ipv6 addresses need brackets around them */ > + if (strchr(s->host, ':')) { > + g_string_append(str, "["); > + g_string_append(str, s->host); > + g_string_append(str, "]?"); > + } else { > + g_string_append(str, s->host); > + g_string_append(str, "?"); > + } Looks good, though detecting the presence of ":" feels a bit magic :) Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel