/* reset the context for the session */
context->session = session;
context->flags = 0;
- context->api_index = -1;
+ context->api_key = NULL;
context->loa_in = afb_session_get_LOA(session) & 7;
/* check the token */
void *afb_context_get(struct afb_context *context)
{
assert(context->session != NULL);
- return afb_session_get_value(context->session, context->api_index);
+ return afb_session_get_cookie(context->session, context->api_key);
}
void afb_context_set(struct afb_context *context, void *value, void (*free_value)(void*))
{
+ int rc;
assert(context->session != NULL);
- return afb_session_set_value(context->session, context->api_index, value, free_value);
+ rc = afb_session_set_cookie(context->session, context->api_key, value, free_value);
+ (void)rc; /* TODO */
}
void afb_context_close(struct afb_context *context)