afb-api-ws: Fix bug introduced by 2e83db0
authorJosé Bollo <jose.bollo@iot.bzh>
Fri, 1 Sep 2017 07:55:57 +0000 (09:55 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 5 Sep 2017 16:37:25 +0000 (18:37 +0200)
Change-Id: Ia73d2d49ac888770f78d65a6258c0184b6aaa2da
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-api-ws.c

index 1bd1071..0022d52 100644 (file)
@@ -325,7 +325,7 @@ int afb_api_ws_add_server(const char *path, struct afb_apiset *apiset)
                goto error;
 
        /* check api name */
-       if (afb_apiset_has(apiset, apiws->api, 1)) {
+       if (!afb_apiset_lookup(apiset, apiws->api, 1)) {
                ERROR("Can't provide ws-server for %s: API %s doesn't exist", path, apiws->api);
                goto error2;
        }