if (!afb_context_check(&xreq->context)) {
afb_context_close(&xreq->context);
afb_xreq_fail_f(xreq, "failed", "invalid token's identity");
if (!afb_context_check(&xreq->context)) {
afb_context_close(&xreq->context);
afb_xreq_fail_f(xreq, "failed", "invalid token's identity");
if (afb_context_check_loa(&xreq->context, 1)) {
afb_xreq_fail_f(xreq, "failed", "invalid creation state");
return 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, 0);
afb_context_close(&xreq->context);
}
afb_context_change_loa(&xreq->context, 0);
afb_context_close(&xreq->context);
}
- if ((stag & AFB_SESSION_LOA_GE) != 0) {
- int loa = (stag >> AFB_SESSION_LOA_SHIFT) & AFB_SESSION_LOA_MASK;
+ if ((sessionflags & AFB_SESSION_LOA_GE) != 0) {
+ int loa = (sessionflags >> AFB_SESSION_LOA_SHIFT) & AFB_SESSION_LOA_MASK;
if (!afb_context_check_loa(&xreq->context, loa)) {
afb_xreq_fail_f(xreq, "failed", "invalid LOA");
return 0;
}
}
if (!afb_context_check_loa(&xreq->context, loa)) {
afb_xreq_fail_f(xreq, "failed", "invalid LOA");
return 0;
}
}
- if ((stag & AFB_SESSION_LOA_LE) != 0) {
- int loa = (stag >> AFB_SESSION_LOA_SHIFT) & AFB_SESSION_LOA_MASK;
+ if ((sessionflags & AFB_SESSION_LOA_LE) != 0) {
+ int loa = (sessionflags >> AFB_SESSION_LOA_SHIFT) & AFB_SESSION_LOA_MASK;
if (afb_context_check_loa(&xreq->context, loa + 1)) {
afb_xreq_fail_f(xreq, "failed", "invalid LOA");
return 0;
if (afb_context_check_loa(&xreq->context, loa + 1)) {
afb_xreq_fail_f(xreq, "failed", "invalid LOA");
return 0;