X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=8c243f7325b9bda6693276be3b5ac4a7c8d674e5;hb=e12c3008f10cf5d61cc3235af6562a007ff08e76;hp=ff35b54b6dce19b9635037067a79808cfe850929;hpb=775144f839df8e3d37ec1cf52d0f7d3849ac7d46;p=src%2Fapp-framework-binder.git diff --git a/src/main.c b/src/main.c index ff35b54b..8c243f73 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015, 2016, 2017 "IoT.bzh" + * Copyright (C) 2015-2018 "IoT.bzh" * Author "Fulup Ar Foll" * Author José Bollo * @@ -40,7 +40,9 @@ #include "afb-hswitch.h" #include "afb-apiset.h" #include "afb-api-so.h" -#include "afb-api-dbus.h" +#if defined(WITH_DBUS_TRANSPARENCY) +# include "afb-api-dbus.h" +#endif #include "afb-api-ws.h" #include "afb-hsrv.h" #include "afb-hreq.h" @@ -51,7 +53,6 @@ #include "afb-common.h" #include "afb-monitor.h" #include "afb-hook.h" -#include "sd-fds.h" #include "afb-debug.h" #include "process-name.h" #include "afb-supervision.h" @@ -586,16 +587,22 @@ static void start(int signum, void *arg) afb_hook_create_svc(NULL, main_config->tracesvc, NULL, NULL); if (main_config->traceevt) afb_hook_create_evt(NULL, main_config->traceevt, NULL, NULL); + if (main_config->traceses) + afb_hook_create_session(NULL, main_config->traceses, NULL, NULL); /* load bindings */ afb_debug("start-load"); apiset_start_list(main_config->so_bindings, afb_api_so_add_binding, "the binding"); +#if defined(WITH_DBUS_TRANSPARENCY) apiset_start_list(main_config->dbus_clients, afb_api_dbus_add_client, "the afb-dbus client"); +#endif apiset_start_list(main_config->ws_clients, afb_api_ws_add_client_weak, "the afb-websocket client"); apiset_start_list(main_config->ldpaths, afb_api_so_add_pathset_fails, "the binding path set"); apiset_start_list(main_config->weak_ldpaths, afb_api_so_add_pathset_nofails, "the weak binding path set"); +#if defined(WITH_DBUS_TRANSPARENCY) apiset_start_list(main_config->dbus_servers, afb_api_dbus_add_server, "the afb-dbus service"); +#endif apiset_start_list(main_config->ws_servers, afb_api_ws_add_server, "the afb-websocket service"); DEBUG("Init config done"); @@ -654,8 +661,6 @@ int main(int argc, char *argv[]) // let's run this program with a low priority nice(20); - sd_fds_init(); - // ------------- Build session handler & init config ------- main_config = afb_config_parse_arguments(argc, argv); if (main_config->name) {