[Spice-devel] [PATCH spice-server 07/11] red-stream: Use mechname for mechname
Frediano Ziglio
fziglio at redhat.com
Mon Dec 11 10:28:04 UTC 2017
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
More information about the Spice-devel
mailing list