mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
some codingstyle improvements
This commit is contained in:
parent
f3f951f064
commit
6d3ee5baac
3 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
/** Sample value remapping for mux.
|
||||
*
|
||||
* @file
|
||||
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
||||
* @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
|
||||
*********************************************************************************/
|
||||
|
|
|
@ -151,7 +151,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
|
||||
switch (reason) {
|
||||
case LWS_CALLBACK_CLIENT_ESTABLISHED:
|
||||
case LWS_CALLBACK_ESTABLISHED: {
|
||||
case LWS_CALLBACK_ESTABLISHED:
|
||||
c->state = STATE_DESTROYED;
|
||||
|
||||
/* Get path of incoming request */
|
||||
|
@ -186,7 +186,6 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
case LWS_CALLBACK_CLOSED:
|
||||
websocket_connection_destroy(c);
|
||||
|
@ -225,7 +224,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
return 0;
|
||||
|
||||
case LWS_CALLBACK_CLIENT_RECEIVE:
|
||||
case LWS_CALLBACK_RECEIVE: {
|
||||
case LWS_CALLBACK_RECEIVE:
|
||||
w = c->node->_vd;
|
||||
|
||||
if (c->node->state != STATE_STARTED)
|
||||
|
@ -258,9 +257,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|||
/* Next message */
|
||||
msg = (struct webmsg *) ((char *) msg + WEBMSG_LEN(msg->length));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
@ -193,6 +193,8 @@ int web_start(struct web *w)
|
|||
|
||||
int web_stop(struct web *w)
|
||||
{
|
||||
info("Stopping Web sub-system");
|
||||
|
||||
if (w->state == STATE_STARTED)
|
||||
lws_cancel_service(w->context);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue