red-stream: Use mechname for mechname

There's no reason to copy mechname into mechlist to use mechlist
instead of mechname.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-12-12 17:20:39 +00:00
parent a7b8ea4b7a
commit f7ca5d4a15

View File

@ -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),