1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

test-apps: dont build extension support if LWS_WITHOUT_EXTENSIONS

This commit is contained in:
Andy Green 2020-08-21 07:48:48 +01:00
parent 28f4aae555
commit 21a22d20ca
2 changed files with 4 additions and 4 deletions

View file

@ -510,7 +510,7 @@ static const struct lws_protocols protocols[] = {
{ NULL, NULL, 0, 0 } /* end */ { NULL, NULL, 0, 0 } /* end */
}; };
#if defined(LWS_ROLE_WS) #if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
static const struct lws_extension exts[] = { static const struct lws_extension exts[] = {
{ {
"permessage-deflate", "permessage-deflate",
@ -704,7 +704,7 @@ int main(int argc, char **argv)
info.protocols = protocols; info.protocols = protocols;
info.gid = -1; info.gid = -1;
info.uid = -1; info.uid = -1;
#if defined(LWS_ROLE_WS) #if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
info.extensions = exts; info.extensions = exts;
#endif #endif

View file

@ -206,7 +206,7 @@ void sighandler(int sig)
lws_cancel_service(context); lws_cancel_service(context);
} }
#if defined(LWS_ROLE_WS) #if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
static const struct lws_extension exts[] = { static const struct lws_extension exts[] = {
{ {
"permessage-deflate", "permessage-deflate",
@ -536,7 +536,7 @@ int main(int argc, char **argv)
info.gid = gid; info.gid = gid;
info.uid = uid; info.uid = uid;
info.options = opts | LWS_SERVER_OPTION_VALIDATE_UTF8 | LWS_SERVER_OPTION_EXPLICIT_VHOSTS; info.options = opts | LWS_SERVER_OPTION_VALIDATE_UTF8 | LWS_SERVER_OPTION_EXPLICIT_VHOSTS;
#if defined(LWS_ROLE_WS) #if defined(LWS_ROLE_WS) && !defined(LWS_WITHOUT_EXTENSIONS)
info.extensions = exts; info.extensions = exts;
#endif #endif
info.timeout_secs = 5; info.timeout_secs = 5;