change context creation params to struct
*** This patch changes an API all apps use ***
Context creation parameters are getting a bit out of control, this
patch creates a struct to contain them.
All the test apps are updated accordingly.
Signed-off-by: Andy Green <andy.green@linaro.org>
diff --git a/test-server/test-client.c b/test-server/test-client.c
index 5d55928..ab6f2f7 100644
--- a/test-server/test-client.c
+++ b/test-server/test-client.c
@@ -201,6 +201,9 @@
int ietf_version = -1; /* latest */
int mirror_lifetime = 0;
int longlived = 0;
+ struct lws_context_creation_info info;
+
+ memset(&info, 0, sizeof info);
fprintf(stderr, "libwebsockets test client\n"
"(C) Copyright 2010-2013 Andy Green <andy@warmcat.com> "
@@ -253,14 +256,15 @@
* For this client-only demo, we tell it to not listen on any port.
*/
- context = libwebsocket_create_context(CONTEXT_PORT_NO_LISTEN, NULL,
- protocols,
+ info.port = CONTEXT_PORT_NO_LISTEN;
+ info.protocols = protocols;
#ifndef LWS_NO_EXTENSIONS
- libwebsocket_internal_extensions,
-#else
- NULL,
+ info.extensions = libwebsocket_internal_extensions;
#endif
- NULL, NULL, NULL, -1, -1, 0, NULL);
+ info.gid = -1;
+ info.uid = -1;
+
+ context = libwebsocket_create_context(&info);
if (context == NULL) {
fprintf(stderr, "Creating libwebsocket context failed\n");
return 1;