X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fafs-main.c;h=93e49323ebdbdd0b3bf01a06c7cc0193aa538a08;hb=c8558c8a28966110aa3a356f95d3c60afe32b64a;hp=99689e9001d923b08534903571b2542de8303b9c;hpb=ac7a95223a6314cca6250495ea59c3cf7e46e89e;p=src%2Fapp-framework-binder.git diff --git a/src/afs-main.c b/src/afs-main.c index 99689e90..93e49323 100644 --- a/src/afs-main.c +++ b/src/afs-main.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,6 +30,7 @@ #include "afb-hswitch.h" #include "afb-hreq.h" #include "afb-apiset.h" +#include "afb-api-ws.h" #include "afb-session.h" #include "afs-supervisor.h" @@ -149,6 +150,15 @@ static void start(int signum, void *arg) goto error; } + /* export the service if required */ + if (main_config->ws_server) { + rc = afb_api_ws_add_server(main_config->ws_server, main_apiset); + if (rc < 0) { + ERROR("Can't export (ws-server) api %s: %m", main_config->ws_server); + goto error; + } + } + /* start the services */ if (afb_apiset_start_all_services(main_apiset, 1) < 0) goto error;