[Spice-devel] [PATCH spice-server v3 09/12] Handle SASL initialisation mainly in red-stream.c
Christophe Fergeau
cfergeau at redhat.com
Fri Jan 5 13:09:15 UTC 2018
On Fri, Dec 22, 2017 at 10:07:10AM +0000, Frediano Ziglio wrote:
> Asynchronous code jumping from a file to another is tedious to read
> also having code handling the same stuff in two files does not look
> a good design.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/red-stream.c | 118 +++++++++++++++++++++++++++++++++-------------------
> server/red-stream.h | 11 +----
> server/reds.c | 118 ++++++----------------------------------------------
> 3 files changed, 89 insertions(+), 158 deletions(-)
>
> diff --git a/server/red-stream.c b/server/red-stream.c
> index fccad8b27..a0423228f 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -732,6 +732,33 @@ static int auth_sasl_check_ssf(RedSASL *sasl, int *runSSF)
> return 1;
> }
>
> +typedef struct RedSASLAuth {
> + RedStream *stream;
> + RedSaslResult result_cb;
> + void *result_opaque;
> + AsyncReadError saved_error;
I would call this "saved_error_cb", I first thought this would be an
enum or some kind of int error value.
Looks good to me apart from this, though I'll need to test it.
Christophe
-------------- 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/20180105/20c55e11/attachment.sig>
More information about the Spice-devel
mailing list