From 68875647b1a787bc9ec48a2e0d7096cbddcebfd9 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Sun, 24 Feb 2019 18:17:21 +0000 Subject: [PATCH] Un-deprecate `WebsocketConnection::getActiveWebsockets()` and make `static`, returning `const WebsocketList` to prevent dangerous modifications. See #1469 --- .../Network/Http/Websocket/WebsocketConnection.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sming/SmingCore/Network/Http/Websocket/WebsocketConnection.h b/Sming/SmingCore/Network/Http/Websocket/WebsocketConnection.h index 862895e159..fc7109a115 100644 --- a/Sming/SmingCore/Network/Http/Websocket/WebsocketConnection.h +++ b/Sming/SmingCore/Network/Http/Websocket/WebsocketConnection.h @@ -175,8 +175,12 @@ class WebsocketConnection return (this == &rhs); } - /** @deprecated Will be removed */ - WebsocketList& getActiveWebsockets() SMING_DEPRECATED + /** + * @brief Obtain the list of active websockets + * @retval const WebsocketList& + * @note Return value is const as only restricted operations should be carried out on the list. + */ + static const WebsocketList& getActiveWebsockets() { return websocketList; }