mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
api: bug fixes
This commit is contained in:
parent
8890767068
commit
b4af9f0290
2 changed files with 4 additions and 2 deletions
|
@ -154,7 +154,8 @@ int api_http_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, void
|
|||
if (ret)
|
||||
return -1;
|
||||
|
||||
list_remove(&w->api->sessions, s);
|
||||
if (w->api->sessions.state == STATE_INITIALIZED)
|
||||
list_remove(&w->api->sessions, s);
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ static int api_restart(struct api_action *h, json_t *args, json_t **resp, struct
|
|||
json_error_t err;
|
||||
|
||||
/* If no config is provided via request, we will use the previous one */
|
||||
config = strdup(s->api->super_node->uri);
|
||||
if (s->api->super_node->uri)
|
||||
config = strdup(s->api->super_node->uri);
|
||||
|
||||
if (args) {
|
||||
ret = json_unpack_ex(args, &err, 0, "{ s?: s }", "config", &config);
|
||||
|
|
Loading…
Add table
Reference in a new issue