[Libwebsockets] [PATCH 10/11] libev: also select libev if the LWS_SERVER_OPTION_LIBEV flag is set

Alejandro Mery amery at geeks.cl
Tue Dec 16 00:36:31 CET 2014


Signed-off-by: Alejandro Mery <amery at geeks.cl>
---
 lib/context.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/context.c b/lib/context.c
index 884849e..f177383 100644
--- a/lib/context.c
+++ b/lib/context.c
@@ -106,6 +106,14 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
 		return NULL;
 	}
 
+	/* basic LWS_SERVER_OPTION_LIBEV compatibility */
+	if (info->options & LWS_SERVER_OPTION_LIBEV) {
+#ifdef LWS_USE_LIBEV
+		info->event = LWS_EVENT_LIBEV;
+#endif
+		info->options &= ~LWS_SERVER_OPTION_LIBEV;
+	}
+
 	switch (info->event) {
 #ifdef LWS_USE_LIBEV
 	case LWS_EVENT_LIBEV:
-- 
2.2.0




More information about the Libwebsockets mailing list