Change-Id: I590bf289ce597531622dc95bb00df11e0a8bdbb6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
#define NO_BINDING_VERBOSE_MACRO
#include <stdlib.h>
#define NO_BINDING_VERBOSE_MACRO
#include <stdlib.h>
+#include <stdint.h>
+#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
-#include <systemd/sd-event.h>
#include <systemd/sd-daemon.h>
#include <systemd/sd-daemon.h>
-#include <afb/afb-binding.h>
-
#include "afb-config.h"
#include "afb-hswitch.h"
#include "afb-apiset.h"
#include "afb-config.h"
#include "afb-hswitch.h"
#include "afb-apiset.h"
#include "afb-api-dbus.h"
#include "afb-api-ws.h"
#include "afb-hsrv.h"
#include "afb-api-dbus.h"
#include "afb-api-ws.h"
#include "afb-hsrv.h"
-#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-xreq.h"
#include "afb-hreq.h"
#include "afb-xreq.h"
#include "jobs.h"
#include "afb-session.h"
#include "verbose.h"
#include "jobs.h"
#include "afb-session.h"
#include "verbose.h"
free(sreq->api);
free(sreq->verb);
json_object_put(sreq->xreq.json);
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);
sreq->current = sreq->current->next;
if (sreq->current)
startup_call_current(sreq);
if (verb) {
json = strchr(verb, ':');
if (json) {
if (verb) {
json = strchr(verb, ':');
if (json) {
- memset(&sreq->xreq, 0, sizeof sreq->xreq);
afb_xreq_init(&sreq->xreq, &startup_xreq_itf);
afb_context_init(&sreq->xreq.context, sreq->session, NULL);
sreq->xreq.context.validated = 1;
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;
sreq->api = strndup(api, verb - api);
sreq->verb = strndup(verb + 1, json - verb - 1);
sreq->xreq.api = sreq->api;
- ARGS="-q --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --roothttp=$TEST --token=$TOKEN --ws-client=unix:hello "
-# ARGS="-vv --tracereq=all --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --roothttp=$TEST --token=$TOKEN --ws-client=unix:hello "
+ ARGS="-q --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:@afw:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --roothttp=$TEST --token=$TOKEN --ws-client=unix:@afw:hello "
+# ARGS="$ARGS -vvv --tracereq=all"
;;
*)
ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO"
;;
*)
ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO"