1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

added test to lookup file

This commit is contained in:
Falk Werner
2020-06-14 10:39:33 +02:00
parent edcad5dc4c
commit 28f3f4ca47
5 changed files with 217 additions and 7 deletions

View File

@@ -146,6 +146,7 @@ static int wf_impl_client_protocol_lws_callback(
break;
case LWS_CALLBACK_CLIENT_RECEIVE:
wf_impl_client_protocol_process(protocol, in, len);
break;
case LWS_CALLBACK_SERVER_WRITEABLE:
// fall-through
case LWS_CALLBACK_CLIENT_WRITEABLE:
@@ -169,6 +170,11 @@ static int wf_impl_client_protocol_lws_callback(
}
}
break;
case LWS_CALLBACK_RAW_RX_FILE:
if ((NULL != protocol->filesystem) && (wsi == protocol->filesystem->wsi))
{
wf_impl_filesystem_process_request(protocol->filesystem);
}
default:
break;
}
@@ -201,15 +207,17 @@ void
wf_impl_client_protocol_cleanup(
struct wf_client_protocol * protocol)
{
if (NULL != protocol->filesystem)
{
wf_impl_filesystem_dispose(protocol->filesystem);
}
protocol->callback(protocol->user_data, WF_CLIENT_CLEANUP, NULL);
wf_jsonrpc_proxy_dispose(protocol->proxy);
wf_timer_manager_dispose(protocol->timer_manager);
wf_message_queue_cleanup(&protocol->messages);
if (NULL != protocol->filesystem)
{
wf_impl_filesystem_dispose(protocol->filesystem);
protocol->filesystem = NULL;
}
}
void