X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-svc.c;h=6b6b0a536e0da99d45031b443a1413bf562d7457;hb=a138fda9841c46e28de93e32aee62956e26556b1;hp=d4932802e74186857942cdaac8c58cc09ebf79e0;hpb=09010fa0093bee944738b728bf3277961d9bd6d7;p=src%2Fapp-framework-binder.git diff --git a/src/afb-svc.c b/src/afb-svc.c index d4932802..6b6b0a53 100644 --- a/src/afb-svc.c +++ b/src/afb-svc.c @@ -30,6 +30,7 @@ #include "afb-msg-json.h" #include "afb-svc.h" #include "afb-xreq.h" +#include "afb-cred.h" #include "afb-apis.h" #include "verbose.h" @@ -230,6 +231,7 @@ static void svc_call(void *closure, const char *api, const char *verb, struct js afb_xreq_init(&svcreq->xreq, &afb_svc_xreq_itf); afb_context_init(&svcreq->xreq.context, svc->session, NULL); svcreq->xreq.context.validated = 1; + svcreq->xreq.cred = afb_cred_current(); svcreq->xreq.api = api; svcreq->xreq.verb = verb; svcreq->xreq.listener = svc->listener; @@ -247,6 +249,7 @@ static void svcreq_destroy(struct afb_xreq *xreq) struct svc_req *svcreq = CONTAINER_OF_XREQ(struct svc_req, xreq); afb_context_disconnect(&svcreq->xreq.context); json_object_put(svcreq->xreq.json); + afb_cred_unref(svcreq->xreq.cred); free(svcreq); }