Change-Id: If93e243378efbb6329bb9cc60d869261ddc33c48
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
req.itf->session_close(req.req_closure);
}
req.itf->session_close(req.req_closure);
}
+#include <stdlib.h>
+
+static inline struct afb_req *afb_req_store(struct afb_req req)
+{
+ struct afb_req *result = malloc(sizeof *result);
+ if (result != NULL)
+ *result = req;
+ return result;
+}
+
+static inline struct afb_req afb_req_unstore(struct afb_req *req)
+{
+ struct afb_req result = *req;
+ free(req);
+ return result;
+}
+
#if !defined(_GNU_SOURCE)
# error "_GNU_SOURCE must be defined for using vasprintf"
#endif
#include <stdarg.h>
#if !defined(_GNU_SOURCE)
# error "_GNU_SOURCE must be defined for using vasprintf"
#endif
#include <stdarg.h>
#include <stdio.h>
static inline void afb_req_fail_v(struct afb_req req, const char *status, const char *info, va_list args)
#include <stdio.h>
static inline void afb_req_fail_v(struct afb_req req, const char *status, const char *info, va_list args)