refactor: use impl prefix for lwslog functions

pull/2/head
Falk Werner 4 years ago
parent 4abacef616
commit fa2b84352f

@ -27,7 +27,7 @@ struct wfp_client
struct wfp_client * wfp_impl_client_create( struct wfp_client * wfp_impl_client_create(
struct wfp_client_config * config) struct wfp_client_config * config)
{ {
wfp_lwslog_disable(); wfp_impl_lwslog_disable();
struct wfp_client * client = malloc(sizeof(struct wfp_client)); struct wfp_client * client = malloc(sizeof(struct wfp_client));
wfp_impl_client_protocol_init(&client->protocol, &config->provider, config->user_data); wfp_impl_client_protocol_init(&client->protocol, &config->provider, config->user_data);

@ -4,14 +4,14 @@
#define WFP_LWSLOG_DISABLE 0 #define WFP_LWSLOG_DISABLE 0
static bool wfp_lwslog_is_diabled = false; static bool wfp_impl_lwslog_is_diabled = false;
void wfp_lwslog_disable(void) void wfp_impl_lwslog_disable(void)
{ {
if (!wfp_lwslog_is_diabled) if (!wfp_impl_lwslog_is_diabled)
{ {
lws_set_log_level(WFP_LWSLOG_DISABLE, NULL); lws_set_log_level(WFP_LWSLOG_DISABLE, NULL);
wfp_lwslog_is_diabled = true; wfp_impl_lwslog_is_diabled = true;
} }
} }

@ -6,7 +6,7 @@ extern "C"
{ {
#endif #endif
extern void wfp_lwslog_disable(void); extern void wfp_impl_lwslog_disable(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -31,7 +31,7 @@ namespace
, provider(nullptr) , provider(nullptr)
{ {
json_object_seed(0); json_object_seed(0);
wfp_lwslog_disable(); wfp_impl_lwslog_disable();
} }
protected: protected:

@ -146,7 +146,7 @@ WsServer::Private::Private(std::string const & protocol, int port)
, is_shutdown_requested(false) , is_shutdown_requested(false)
, wsi_(nullptr) , wsi_(nullptr)
{ {
wfp_lwslog_disable(); wfp_impl_lwslog_disable();
IServer * server = this; IServer * server = this;
memset(ws_protocols, 0, sizeof(struct lws_protocols) * 2 ); memset(ws_protocols, 0, sizeof(struct lws_protocols) * 2 );

@ -150,7 +150,7 @@ WsServer2::Private::Private(
, is_shutdown_requested(false) , is_shutdown_requested(false)
, wsi_(nullptr) , wsi_(nullptr)
{ {
wfp_lwslog_disable(); wfp_impl_lwslog_disable();
IServer * server = this; IServer * server = this;
memset(ws_protocols, 0, sizeof(struct lws_protocols) * 2 ); memset(ws_protocols, 0, sizeof(struct lws_protocols) * 2 );

Loading…
Cancel
Save