Meir Yanovich 2016-04-01 15:56:48 +08:00 committed by Andy Green
parent 1c428c3154
commit 9694ebefe8
2 changed files with 6 additions and 4 deletions

View file

@ -39,7 +39,7 @@ lws_io_cb(uv_poll_t *watcher, int status, int revents)
struct lws_pollfd eventfd;
#if defined(WIN32) || defined(_WIN32)
eventfd.fd = watcher->sock;
eventfd.fd = watcher->socket;
#else
eventfd.fd = watcher->io_watcher.fd;
#endif
@ -138,7 +138,7 @@ lws_uv_initloop(struct lws_context *context, uv_loop_t *loop, int tsi)
while (vh) {
if (vh->lserv_wsi) {
vh->lserv_wsi->w_read.context = context;
uv_poll_init(pt->io_loop_uv,
uv_poll_init_socket(pt->io_loop_uv,
&vh->lserv_wsi->w_read.uv_watcher,
vh->lserv_wsi->sock);
uv_poll_start(&vh->lserv_wsi->w_read.uv_watcher,
@ -212,7 +212,7 @@ lws_libuv_io(struct lws *wsi, int flags)
struct lws_context *context = lws_get_context(wsi);
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
#if defined(WIN32) || defined(_WIN32)
int current_events = wsi->w_read.uv_watcher.io.events &
int current_events = wsi->w_read.uv_watcher.events &
(UV_READABLE | UV_WRITABLE);
#else
int current_events = wsi->w_read.uv_watcher.io_watcher.pevents &

View file

@ -227,7 +227,8 @@ int main(int argc, char **argv)
}
}
#if !defined(LWS_NO_DAEMONIZE) && !defined(WIN32)
#if !defined(WIN32)
#if !defined(LWS_NO_DAEMONIZE)
/*
* normally lock path would be /var/lock/lwsts or similar, to
* simplify getting started without having to take care about
@ -242,6 +243,7 @@ int main(int argc, char **argv)
/* we will only try to log things according to our debug_level */
setlogmask(LOG_UPTO (LOG_DEBUG));
openlog("lwsts", syslog_options, LOG_DAEMON);
#endif
/* tell the library what debug level to emit and to send it to syslog */
lws_set_log_level(debug_level, lwsl_emit_syslog);