summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
4d0e21f)
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
{
int rc;
struct api_ws *apiws;
{
int rc;
struct api_ws *apiws;
/* creates the ws api object */
apiws = api_ws_make(path);
if (apiws == NULL)
goto error;
/* creates the ws api object */
apiws = api_ws_make(path);
if (apiws == NULL)
goto error;
+ /* check api name */
+ if (afb_apiset_get(apiset, apiws->api, &api)) {
+ ERROR("Can't provide ws-server for %s: API %s doesn't exist", path, apiws->api);
+ goto error2;
+ }
+
/* connect for serving */
rc = api_ws_server_connect(apiws);
if (rc < 0)
/* connect for serving */
rc = api_ws_server_connect(apiws);
if (rc < 0)