On Wed, Nov 22, 2017 at 11:53:55AM +0000, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/reds.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/server/reds.c b/server/reds.c > index 2b43bc0d..8bda85c7 100644 > --- a/server/reds.c > +++ b/server/reds.c > @@ -2036,11 +2036,8 @@ static void reds_handle_ticket(void *opaque) > RedLinkInfo *link = (RedLinkInfo *)opaque; > RedsState *reds = link->reds; > char *password; > - time_t ltime; > int password_size; > > - //todo: use monotonic time > - time(<ime); > if (RSA_size(link->tiTicketing.rsa) < SPICE_MAX_PASSWORD_LENGTH) { > spice_warning("RSA modulus size is smaller than SPICE_MAX_PASSWORD_LENGTH (%d < %d), " > "SPICE ticket sent from client may be truncated", > @@ -2061,7 +2058,8 @@ static void reds_handle_ticket(void *opaque) > password[password_size] = '\0'; > > if (reds->config->ticketing_enabled && !link->skip_auth) { > - int expired = reds->config->taTicket.expiration_time < ltime; > + time_t ltime; > + bool expired; > > if (strlen(reds->config->taTicket.password) == 0) { > spice_warning("Ticketing is enabled, but no password is set. " > @@ -2069,6 +2067,10 @@ static void reds_handle_ticket(void *opaque) > goto error; > } > > + //todo: use monotonic time > + time(<ime); > + expired = reds->config->taTicket.expiration_time < ltime; > + You can drop the extra white-space after the "= ". I'd put the right hand side member around () to make it more obvious it's a condition, but we usually disagree on this kind of details ;) Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel