1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

web: disable libwebsocket server status as it has been removed from upstream lib

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
Steffen Vogel 2023-04-03 13:02:08 +00:00 committed by Philipp Jungkamp
parent 46bc0eed7a
commit 88fb57df8e

View file

@ -22,24 +22,6 @@ namespace api {
class StatusRequest : public Request {
protected:
#ifdef LWS_WITH_SERVER_STATUS
json_t * getLwsStatus()
{
int ret;
struct lws_context *ctx = lws_get_context(session->wsi);
char buf[4096];
ret = lws_json_dump_context(ctx, buf, sizeof(buf), 0);
if (ret <= 0)
throw Error(HTTP_STATUS_INTERNAL_SERVER_ERROR, "Failed to dump LWS context");
return json_loads(buf, 0, nullptr);
}
#endif /* LWS_WITH_SERVER_STATUS */
public:
using Request::Request;
@ -129,10 +111,6 @@ public:
if (!json_status)
throw Error(HTTP_STATUS_INTERNAL_SERVER_ERROR, "Failed to prepare response: {}", err.text);
#ifdef LWS_WITH_SERVER_STATUS
json_object_set(json_status, "lws", getLwsStatus());
#endif /* LWS_WITH_SERVER_STATUS */
return new JsonResponse(session, HTTP_STATUS_OK, json_status);
}
};