mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
websocket: fix format selection
This commit is contained in:
parent
6002d8fa04
commit
7dc66355f3
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
|
||||
format = strtok(NULL, "");
|
||||
if (!format)
|
||||
format = "villas-web";
|
||||
format = "villas.web";
|
||||
|
||||
/* Search for node whose name matches the URI. */
|
||||
c->node = list_lookup(&p.node.instances, node);
|
||||
|
@ -162,7 +162,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
}
|
||||
|
||||
struct format_type *fmt = format_type_lookup(format);
|
||||
if (fmt) {
|
||||
if (!fmt) {
|
||||
websocket_connection_close(c, wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, "Invalid format");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue