mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
added function to interrupt _service calls
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "webfuse/provider/impl/dirbuffer.h"
|
||||
#include "webfuse/provider/impl/credentials.h"
|
||||
|
||||
#include "webfuse/core/util.h"
|
||||
|
||||
// respond
|
||||
|
||||
void wfp_respond_error(
|
||||
@@ -223,11 +225,18 @@ void wfp_client_dispose(
|
||||
|
||||
void wfp_client_service(
|
||||
struct wfp_client * client,
|
||||
int timeout_ms)
|
||||
int WF_UNUSED_PARAM(timeout_ms))
|
||||
{
|
||||
wfp_impl_client_service(client, timeout_ms);
|
||||
wfp_impl_client_service(client);
|
||||
}
|
||||
|
||||
void wfp_client_interrupt(
|
||||
struct wfp_client * client)
|
||||
{
|
||||
wfp_impl_client_interrupt(client);
|
||||
}
|
||||
|
||||
|
||||
// dirbuffer
|
||||
|
||||
struct wfp_dirbuffer * wfp_dirbuffer_create(void)
|
||||
|
||||
@@ -84,9 +84,13 @@ bool wfp_impl_client_is_connected(
|
||||
}
|
||||
|
||||
void wfp_impl_client_service(
|
||||
struct wfp_client * client,
|
||||
int timeout_ms)
|
||||
struct wfp_client * client)
|
||||
{
|
||||
lws_service(client->context, timeout_ms);
|
||||
lws_service(client->context, 0);
|
||||
}
|
||||
|
||||
void wfp_impl_client_interrupt(
|
||||
struct wfp_client * client)
|
||||
{
|
||||
lws_cancel_service(client->context);
|
||||
}
|
||||
|
||||
@@ -38,8 +38,10 @@ extern bool wfp_impl_client_is_connected(
|
||||
struct wfp_client * client);
|
||||
|
||||
extern void wfp_impl_client_service(
|
||||
struct wfp_client * client,
|
||||
int timeout_ms);
|
||||
struct wfp_client * client);
|
||||
|
||||
extern void wfp_impl_client_interrupt(
|
||||
struct wfp_client * client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user