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@xxxxxxxxxx> > --- > 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
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel