1
0
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:
Falk Werner
2020-03-07 15:27:04 +01:00
parent 627986e8b5
commit d2f078298e
8 changed files with 80 additions and 16 deletions

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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
}