-/*
- * check whether the token of 'session' is 'token'
- * return 1 if true or 0 otherwise
- */
-int afb_session_check_token (struct afb_session *session, const char *token)
-{
- int r;
-
- session_lock(session);
- r = !session->closed
- && session->expiration >= NOW
- && !(session->token && strcmp(token, afb_token_string(session->token)));
- session_unlock(session);
- return r;
-}
-