Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
fix compile if no libuv
Browse files Browse the repository at this point in the history
  • Loading branch information
liudongmiao committed Mar 7, 2024
1 parent 73d5756 commit 5edcd6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 1 addition & 3 deletions common.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ uint16_t get_port(struct lws *wsi) {
}

struct lws_context *create_context(struct lws_context_creation_info *info) {
struct lws_context *context;
info->timeout_secs = 30;
info->pt_serv_buf_size = PT_SERV_BUF_SIZE;
#ifdef LWS_SERVER_OPTION_LIBUV
struct lws_context *context;
info->options |= LWS_SERVER_OPTION_LIBUV;
if ((context = lws_create_context(info)) != NULL) {
lwsl_user("created context with libuv");
Expand Down
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "libwebsockets.h"

#ifndef WSS_PLUGIN_VERSION
#define WSS_PLUGIN_VERSION "0.3.2"
#define WSS_PLUGIN_VERSION "0.3.3"
#endif

#ifndef RX_BUFFER_SIZE
Expand Down
2 changes: 2 additions & 0 deletions wss-plugin-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ int main(int argc, char **argv) {
info.protocols = protocols;
info.vhost_name = "context";
info.user = &context_data;
info.timeout_secs = 30;
info.pt_serv_buf_size = PT_SERV_BUF_SIZE;
context = create_context(&info);
if (!context) {
lwsl_err("cannot create context");
Expand Down
2 changes: 2 additions & 0 deletions wss-plugin-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ int main(int argc, char **argv) {
info.protocols = protocols;
info.vhost_name = "context";
info.user = &context_data;
info.timeout_secs = 30;
info.pt_serv_buf_size = PT_SERV_BUF_SIZE;
context = create_context(&info);
if (!context) {
lwsl_err("cannot create context");
Expand Down

0 comments on commit 5edcd6e

Please sign in to comment.