X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-context.c;h=6eb29f0d461bbfab54a35e7f946b9089ad9a4b73;hb=3bf52bb36ed428d0a7b947519fbccc7c376fd4a9;hp=eec4ebb0a62606cb648a13175c580f9ed92791ef;hpb=8ab18c9dd70205755b67001ce27a499c0196ad63;p=src%2Fapp-framework-binder.git diff --git a/src/afb-context.c b/src/afb-context.c index eec4ebb0..6eb29f0d 100644 --- a/src/afb-context.c +++ b/src/afb-context.c @@ -31,7 +31,7 @@ static void init_context(struct afb_context *context, struct afb_session *sessio /* 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 */ @@ -109,13 +109,15 @@ const char *afb_context_sent_uuid(struct afb_context *context) 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)