#include "afb-msg-json.h"
#include "afb-svc.h"
#include "afb-xreq.h"
+#include "afb-cred.h"
#include "afb-apis.h"
#include "verbose.h"
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;
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);
}