Re: [spice-gtk 11/13] Make SpiceURI a public API

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

 



On Mon, Feb 03, 2014 at 07:02:42PM +0100, Marc-André Lureau wrote:
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> +/**
> + * spice_uri_to_string:
> + * @uri: a #SpiceURI
> + *
> + * Returns a string representing @uri.
> + *
> + * Returns: a string representing @uri, which the caller must free.
> + * Since: 0.23
> + **/
> +gchar* spice_uri_to_string(SpiceURI* self)
> +{
> +    SpiceURIPrivate *p;
> +
> +    g_return_val_if_fail(SPICE_IS_URI(self), NULL);
> +    p = self->priv;
> +
> +    if (p->scheme == NULL || p->hostname == NULL)
> +        return NULL;
> +
> +    if (p->user || p->password) {
> +        return g_strdup_printf("%s://%s:%s@%s:%u",
> +                               p->scheme,
> +                               p->user ?: "", p->password ?: "",
> +                               p->hostname, p->port);

Actually this block is silently added in this rename, it belongs to the commit
adding user/password

Christophe

Attachment: pgp7Oo6uJns0l.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]