afb-api-ws: Fix bug introduced by 2e83db0
[src/app-framework-binder.git] / 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;
        }