From c19ce12fca7560d3712d4e1661e06be3592baf75 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Fri, 14 Sep 2018 10:14:31 +0200 Subject: afb-session: Fix an issue in managing sessions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Probably an old copy/paste error in the commit d45426257d5149c735e33e3055220625a919e7bc It doesn't affect version EE (Electric Eel). Bug-AGL: SPEC-1735 Change-Id: Ia1536e141ac12275000196a3218eb62d77b36a06 Signed-off-by: José Bollo --- src/afb-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afb-session.c b/src/afb-session.c index fdc88fdf..00aac69d 100644 --- a/src/afb-session.c +++ b/src/afb-session.c @@ -574,7 +574,7 @@ int afb_session_check_token (struct afb_session *session, const char *token) { int r; - session_unlock(session); + session_lock(session); r = !session->closed && session->expiration >= NOW && !(session->token[0] && strcmp (token, session->token)); @@ -585,7 +585,7 @@ int afb_session_check_token (struct afb_session *session, const char *token) /* generate a new token and update client context */ void afb_session_new_token (struct afb_session *session) { - session_unlock(session); + session_lock(session); new_uuid(session->token); session_update_expiration(session, NOW); afb_hook_session_renew(session); -- cgit 1.2.3-korg