X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=6684ed5e98928ff2dde58e96150fbd3e64c75635;hb=a138fda9841c46e28de93e32aee62956e26556b1;hp=4dc6cb81b2a6dd6f60f3eea0948aa431b5025965;hpb=03f863dd080d32f71c4a0755c02e23c72e4cb342;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index 4dc6cb81..6684ed5e 100644 --- a/src/main.c +++ b/src/main.c @@ -44,6 +44,7 @@ #include "afb-context.h" #include "afb-hreq.h" #include "afb-xreq.h" +#include "afb-cred.h" #include "jobs.h" #include "afb-session.h" #include "verbose.h" @@ -467,6 +468,7 @@ static void startup_call_unref(struct afb_xreq *xreq) free(sreq->api); free(sreq->verb); json_object_put(sreq->xreq.json); + afb_cred_unref(sreq->xreq.cred); sreq->current = sreq->current->next; if (sreq->current) startup_call_current(sreq); @@ -496,6 +498,7 @@ static void startup_call_current(struct startup_req *sreq) afb_xreq_init(&sreq->xreq, &startup_xreq_itf); afb_context_init(&sreq->xreq.context, sreq->session, NULL); sreq->xreq.context.validated = 1; + sreq->xreq.cred = afb_cred_current(); sreq->api = strndup(api, verb - api); sreq->verb = strndup(verb + 1, json - verb - 1); sreq->xreq.api = sreq->api;