Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
wrap-json: Sync with app-afb-helpers-submodule
[src/app-framework-binder.git]
/
src
/
afs-main.c
diff --git
a/src/afs-main.c
b/src/afs-main.c
index
99689e9
..
93e4932
100644
(file)
--- 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 <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author José Bollo <jose.bollo@iot.bzh>
*
* 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-hswitch.h"
#include "afb-hreq.h"
#include "afb-apiset.h"
+#include "afb-api-ws.h"
#include "afb-session.h"
#include "afs-supervisor.h"
#include "afb-session.h"
#include "afs-supervisor.h"
@@
-149,6
+150,15
@@
static void start(int signum, void *arg)
goto error;
}
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;
/* start the services */
if (afb_apiset_start_all_services(main_apiset, 1) < 0)
goto error;