mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
event lib: glib: LWS_WITH_GLIB option fixes
This commit is contained in:
parent
af2f1f9a87
commit
c966aae30a
3 changed files with 7 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libwebsockets - small server side websockets and web server implementation
|
||||
*
|
||||
* Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
|
||||
* Copyright (C) 2010 - 2020 Andy Green <andy@warmcat.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -27,7 +27,8 @@
|
|||
int
|
||||
_lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
|
||||
{
|
||||
#if !defined(LWS_WITH_LIBUV) && !defined(LWS_WITH_LIBEV) && !defined(LWS_WITH_LIBEVENT)
|
||||
#if !defined(LWS_WITH_LIBUV) && !defined(LWS_WITH_LIBEV) && \
|
||||
!defined(LWS_WITH_LIBEVENT) && !defined(LWS_WITH_GLIB)
|
||||
volatile struct lws_context_per_thread *vpt;
|
||||
#endif
|
||||
struct lws_context_per_thread *pt;
|
||||
|
@ -71,10 +72,8 @@ _lws_change_pollfd(struct lws *wsi, int _and, int _or, struct lws_pollargs *pa)
|
|||
|
||||
assert(wsi->position_in_fds_table < (int)pt->fds_count);
|
||||
|
||||
#if !defined(LWS_WITH_LIBUV) && \
|
||||
!defined(LWS_WITH_LIBEV) && \
|
||||
!defined(LWS_WITH_LIBEVENT) && \
|
||||
!defined(LWS_WITH_GLIB)
|
||||
#if !defined(LWS_WITH_LIBUV) && !defined(LWS_WITH_LIBEV) && \
|
||||
!defined(LWS_WITH_LIBEVENT) && !defined(LWS_WITH_GLIB)
|
||||
/*
|
||||
* This only applies when we use the default poll() event loop.
|
||||
*
|
||||
|
|
|
@ -434,7 +434,7 @@ struct lws_context_per_thread {
|
|||
#endif
|
||||
|
||||
#if defined(LWS_WITH_LIBEV) || defined(LWS_WITH_LIBUV) || \
|
||||
defined(LWS_WITH_LIBEVENT)
|
||||
defined(LWS_WITH_LIBEVENT) || defined(LWS_WITH_GLIB)
|
||||
struct lws_signal_watcher w_sigint;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ int main(int argc, const char **argv)
|
|||
if (info.options & LWS_SERVER_OPTION_LIBEV)
|
||||
foreign_event_loop_cleanup_libev();
|
||||
#endif
|
||||
#if defined(LWS_WITH_LIBEV)
|
||||
#if defined(LWS_WITH_GLIB)
|
||||
if (info.options & LWS_SERVER_OPTION_GLIB)
|
||||
foreign_event_loop_cleanup_glib();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue