[Spice-devel] [PATCH spice-server 07/11] red-stream: Use mechname for mechname
Christophe Fergeau
cfergeau at redhat.com
Tue Dec 19 16:14:42 UTC 2017
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Mon, Dec 11, 2017 at 10:28:04AM +0000, Frediano Ziglio wrote:
> There's no reason to copy mechname into mechlist to use mechlist
> instead of mechname.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/red-stream.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/server/red-stream.c b/server/red-stream.c
> index 5ddf8c54..55e2c3e0 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -886,9 +886,9 @@ RedSaslError red_sasl_handle_auth_start(RedStream *stream, AsyncReadDone read_cb
> }
>
> spice_debug("Start SASL auth with mechanism %s. Data %p (%d bytes)",
> - sasl->mechlist, clientdata, datalen);
> + sasl->mechname, clientdata, datalen);
> err = sasl_server_start(sasl->conn,
> - sasl->mechlist,
> + sasl->mechname,
> clientdata,
> datalen,
> &serverout,
> @@ -1001,9 +1001,6 @@ bool red_sasl_handle_auth_mechname(RedStream *stream, AsyncReadDone read_cb, voi
> }
> }
>
> - g_free(sasl->mechlist);
> - sasl->mechlist = g_strdup(sasl->mechname);
> -
> spice_debug("Validated mechname '%s'", sasl->mechname);
>
> red_stream_async_read(stream, (uint8_t *)&sasl->len, sizeof(uint32_t),
> --
> 2.14.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171219/e16fab26/attachment.sig>
More information about the Spice-devel
mailing list