Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Replace session's value with sessions's cookies
[src/app-framework-binder.git]
/
src
/
afb-context.c
diff --git
a/src/afb-context.c
b/src/afb-context.c
index
eec4ebb
..
6eb29f0
100644
(file)
--- 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;
/* 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 */
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);
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*))
{
}
void afb_context_set(struct afb_context *context, void *value, void (*free_value)(void*))
{
+ int rc;
assert(context->session != NULL);
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)
}
void afb_context_close(struct afb_context *context)