- if ((sessionflags & AFB_SESSION_CREATE) != 0) {
- if (afb_context_check_loa(&xreq->context, 1)) {
- afb_xreq_fail_f(xreq, "failed", "invalid creation state");
- return 0;
- }
- afb_context_change_loa(&xreq->context, 1);
- afb_context_refresh(&xreq->context);
- }
-
- if ((sessionflags & (AFB_SESSION_CREATE | AFB_SESSION_RENEW)) != 0)
- afb_context_refresh(&xreq->context);
-
- if ((sessionflags & AFB_SESSION_CLOSE) != 0) {
- afb_context_change_loa(&xreq->context, 0);
- afb_context_close(&xreq->context);
- }
-