From 30c8563a6d867b47e6d7d2cc277e40b405c5dd8c Mon Sep 17 00:00:00 2001 From: Luciano Iam Date: Sun, 12 Apr 2020 10:42:46 +0200 Subject: WebSockets: rename send_index_* to send_availsurf_* to avoid confusion with a static index page --- libs/surfaces/websockets/server.cc | 10 +++++----- libs/surfaces/websockets/server.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libs') diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 4c43cfad3f..62d56f437c 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -333,7 +333,7 @@ WebsocketsServer::write_client (Client wsi) } int -WebsocketsServer::send_index_hdr (Client wsi) +WebsocketsServer::send_availsurf_hdr (Client wsi) { char url[1024]; @@ -384,7 +384,7 @@ WebsocketsServer::send_index_hdr (Client wsi) } int -WebsocketsServer::send_index_body (Client wsi) +WebsocketsServer::send_availsurf_body (Client wsi) { std::string index = _resources.scan (); @@ -505,13 +505,13 @@ WebsocketsServer::lws_callback (struct lws* wsi, enum lws_callback_reasons reaso break; /* will be called only if the requested url is not fulfilled - by the any of the mount configurations (index, builtin, user) */ + by the any of the mount configurations (builtin, user) */ case LWS_CALLBACK_HTTP: - rc = server->send_index_hdr (wsi); + rc = server->send_availsurf_hdr (wsi); break; case LWS_CALLBACK_HTTP_WRITEABLE: - rc = server->send_index_body (wsi); + rc = server->send_availsurf_body (wsi); break; case LWS_CALLBACK_CLOSED_HTTP: diff --git a/libs/surfaces/websockets/server.h b/libs/surfaces/websockets/server.h index f06b6f8379..c849b29ad9 100644 --- a/libs/surfaces/websockets/server.h +++ b/libs/surfaces/websockets/server.h @@ -86,8 +86,8 @@ private: int del_client (Client); int recv_client (Client, void*, size_t); int write_client (Client); - int send_index_hdr (Client); - int send_index_body (Client); + int send_availsurf_hdr (Client); + int send_availsurf_body (Client); bool io_handler (Glib::IOCondition, lws_sockfd_type); -- cgit v1.2.3