-
- if (hreq->context == NULL) {
- uuid = afb_hreq_get_header(hreq, uuid_header);
- if (uuid == NULL)
- uuid = afb_hreq_get_argument(hreq, uuid_arg);
- if (uuid == NULL)
- uuid = afb_hreq_get_cookie(hreq, cookie_name);
- hreq->context = ctxClientGetForUuid(uuid);
- }
- return hreq->context;
-}
-
-static int req_session_create(struct afb_hreq *hreq)
-{
- struct AFB_clientCtx *context = afb_hreq_context(hreq);
- if (context == NULL)
- return 0;
- if (context->created)
- return 0;
- return req_session_check(hreq, 1);
-}
-
-static int req_session_check(struct afb_hreq *hreq, int refresh)
-{