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:
parent
46bc0eed7a
commit
88fb57df8e
1 changed files with 0 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue