X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-xreq.c;fp=src%2Fafb-xreq.c;h=143048c22788db6c87e7aa77bb9856c50a32cd42;hb=c0562698d8e2613e488b320736255e6bbd49cb2c;hp=b54b4365223ddc4ac8bb63fa0fe0753a18d8c072;hpb=863a97b989aecce8b52a09168c0668ad40df8e1c;p=src%2Fapp-framework-binder.git diff --git a/src/afb-xreq.c b/src/afb-xreq.c index b54b4365..143048c2 100644 --- a/src/afb-xreq.c +++ b/src/afb-xreq.c @@ -443,7 +443,7 @@ int xreq_session_check(struct afb_xreq *xreq, int sessionflags) { int loa; - if ((sessionflags & (AFB_SESSION_CREATE|AFB_SESSION_CLOSE|AFB_SESSION_RENEW|AFB_SESSION_CHECK|AFB_SESSION_LOA_EQ)) != 0) { + if ((sessionflags & (AFB_SESSION_CLOSE|AFB_SESSION_RENEW|AFB_SESSION_CHECK|AFB_SESSION_LOA_EQ)) != 0) { if (!afb_context_check(&xreq->context)) { afb_context_close(&xreq->context); afb_xreq_fail_f(xreq, "failed", "invalid token's identity"); @@ -452,14 +452,6 @@ int xreq_session_check(struct afb_xreq *xreq, int sessionflags) } } - if ((sessionflags & AFB_SESSION_CREATE) != 0) { - if (afb_context_check_loa(&xreq->context, 1)) { - afb_xreq_fail_f(xreq, "failed", "invalid creation state"); - errno = EINVAL; - return -1; - } - } - if ((sessionflags & AFB_SESSION_LOA_GE) != 0) { loa = (sessionflags >> AFB_SESSION_LOA_SHIFT) & AFB_SESSION_LOA_MASK; if (!afb_context_check_loa(&xreq->context, loa)) { @@ -483,7 +475,7 @@ int xreq_session_check(struct afb_xreq *xreq, int sessionflags) void xreq_session_apply(struct afb_xreq *xreq, int sessionflags) { - if ((sessionflags & (AFB_SESSION_CREATE | AFB_SESSION_RENEW)) != 0) { + if ((sessionflags & AFB_SESSION_RENEW) != 0) { afb_context_refresh(&xreq->context); } if ((sessionflags & AFB_SESSION_CLOSE) != 0) {