1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

removed debug output

This commit is contained in:
Falk Werner 2023-01-01 14:54:28 +01:00
parent 2234f69d2d
commit 48a43c9260

View File

@ -30,18 +30,15 @@ extern "C" int webfuse_client_callback(lws * wsi, lws_callback_reasons reason, v
switch(reason) switch(reason)
{ {
case LWS_CALLBACK_CLIENT_ESTABLISHED: case LWS_CALLBACK_CLIENT_ESTABLISHED:
std::cout << "established" << std::endl;
context->connection_listener(true); context->connection_listener(true);
break; break;
case LWS_CALLBACK_CLIENT_CONNECTION_ERROR: case LWS_CALLBACK_CLIENT_CONNECTION_ERROR:
std::cout << "connection error" << std::endl;
context->connection = nullptr; context->connection = nullptr;
context->requests = std::move(std::queue<webfuse::messagewriter>()); context->requests = std::move(std::queue<webfuse::messagewriter>());
context->current_message.clear(); context->current_message.clear();
context->connection_listener(false); context->connection_listener(false);
break; break;
case LWS_CALLBACK_CLIENT_CLOSED: case LWS_CALLBACK_CLIENT_CLOSED:
std::cout << "closed" << std::endl;
context->connection = nullptr; context->connection = nullptr;
context->requests = std::move(std::queue<webfuse::messagewriter>()); context->requests = std::move(std::queue<webfuse::messagewriter>());
context->current_message.clear(); context->current_message.clear();
@ -49,7 +46,6 @@ extern "C" int webfuse_client_callback(lws * wsi, lws_callback_reasons reason, v
break; break;
case LWS_CALLBACK_CLIENT_RECEIVE: case LWS_CALLBACK_CLIENT_RECEIVE:
{ {
std::cout << "receive" << std::endl;
auto * fragment = reinterpret_cast<char*>(in); auto * fragment = reinterpret_cast<char*>(in);
context->current_message.append(fragment, length); context->current_message.append(fragment, length);
if (lws_is_final_fragment(wsi)) if (lws_is_final_fragment(wsi))
@ -74,7 +70,6 @@ extern "C" int webfuse_client_callback(lws * wsi, lws_callback_reasons reason, v
// fall-through // fall-through
case LWS_CALLBACK_CLIENT_WRITEABLE: case LWS_CALLBACK_CLIENT_WRITEABLE:
{ {
std::cout << "writable" << std::endl;
if (!context->requests.empty()) if (!context->requests.empty())
{ {
auto writer = std::move(context->requests.front()); auto writer = std::move(context->requests.front());