aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-ws.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-08-11 16:57:53 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-08-11 19:14:54 +0200
commit8406a51db98b563a4562f26de8338efc0478aff2 (patch)
treeac128c56dff7deb508250e7841d05ac4b12fe3e4 /src/afb-api-ws.c
parent53c7b44e96e6015a4da4f88f22e98b13cfa2e056 (diff)
afb-stub-ws: improvements
The client stub isn't connecting anymore automatically to the apiset. The function 'afb_stub_ws_client_add' provides the feature. The client now returns a afb_api structure. name and on_hangup features added. Change-Id: I204cc39adeb782f5d40360c22c79d14f54dd5c63 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-ws.c')
-rw-r--r--src/afb-api-ws.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c
index dba8d05b..07c8202f 100644
--- a/src/afb-api-ws.c
+++ b/src/afb-api-ws.c
@@ -226,9 +226,14 @@ int afb_api_ws_add_client(const char *path, struct afb_apiset *apiset)
ERROR("can't setup client ws service to %s", apiws->path);
goto error3;
}
+ if (afb_stub_ws_client_add(stubws, apiset) < 0) {
+ ERROR("can't add the client to the apiset for service %s", apiws->path);
+ goto error4;
+ }
free(apiws);
return 0;
-
+error4:
+ afb_stub_ws_unref(stubws);
error3:
close(apiws->fd);
error2: