mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
pipe: do not start API
This commit is contained in:
parent
8a8dd30370
commit
487672e9af
3 changed files with 7 additions and 6 deletions
|
@ -147,9 +147,11 @@ int api_http_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, void
|
|||
void *user_ctx = lws_context_user(ctx);
|
||||
|
||||
Web *w = static_cast<Web *>(user_ctx);
|
||||
Http *s = static_cast<Http *>(user);
|
||||
Api *a = w->getApi();
|
||||
|
||||
Http *s = static_cast<Http *>(user);
|
||||
if (a == nullptr)
|
||||
return -1;
|
||||
|
||||
switch (reason) {
|
||||
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
|
||||
|
|
|
@ -104,10 +104,12 @@ int api_ws_protocol_cb(lws *wsi, enum lws_callback_reasons reason, void *user, v
|
|||
lws_context *ctx = lws_get_context(wsi);
|
||||
void *user_ctx = lws_context_user(ctx);
|
||||
|
||||
Web *w = static_cast<Web*>(user_ctx);
|
||||
Web *w = static_cast<Web *>(user_ctx);
|
||||
WebSocket *s = static_cast<WebSocket *>(user);
|
||||
Api *a = w->getApi();
|
||||
|
||||
WebSocket *s = static_cast<WebSocket *>(user);
|
||||
if (a == nullptr)
|
||||
return -1;
|
||||
|
||||
switch (reason) {
|
||||
case LWS_CALLBACK_ESTABLISHED:
|
||||
|
|
|
@ -378,10 +378,7 @@ check: if (optarg == endptr)
|
|||
/* Only start web subsystem if villas-pipe is used with a websocket node */
|
||||
if (node_type(node)->start == websocket_start) {
|
||||
Web *w = sn.getWeb();
|
||||
Api *a = sn.getApi();
|
||||
|
||||
w->start();
|
||||
a->start();
|
||||
}
|
||||
#endif /* WITH_NODE_WEBSOCKET */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue