diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-09-14 10:14:31 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-09-14 10:22:13 +0200 |
commit | 4ffce04dd0f7c311eaeaadb89b200cebbbe94677 (patch) | |
tree | 75a6bc10980856fc89e71f0d95be69a95c42ec8c | |
parent | 9a3907d6c8aab07638e31ec3cc9a1991cb5b0bdd (diff) |
afb-session: Fix an issue in managing sessionsflounder_6.0.1flounder_6.0.0flounder/6.0.1flounder/6.0.06.0.16.0.0
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 <jose.bollo@iot.bzh>
-rw-r--r-- | src/afb-session.c | 4 |
1 files 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); |