libwebsockets/lib
Andy Green d2ac22c27a make protocols const require explicit context API BREAK
The user protocols struct has not been const until now.

This has been painful for a while because the semantics of the protocols
struct look like it's going to be treated as const.

At context creation, the protocols struct has been getting marked with the context,
and three apis exploited that to only need to be passed a pointer to a protocol to
get access to the context.

This patch removes the two writeable members in the context (these were never directly
used by user code), changes all pointers to protocols to be const, and adds an explicit
first argument to the three affected apis so they can have access to context.

The three affected apis are these

 LWS_VISIBLE LWS_EXTERN int
-lws_callback_on_writable_all_protocol(const struct lws_protocols *protocol);
+lws_callback_on_writable_all_protocol(const struct lws_context *context,
+                                     const struct lws_protocols *protocol);

 LWS_VISIBLE LWS_EXTERN int
-lws_callback_all_protocol(const struct lws_protocols *protocol, int reason);
+lws_callback_all_protocol(struct lws_context *context,
+                         const struct lws_protocols *protocol, int reason);

 LWS_VISIBLE LWS_EXTERN void
-lws_rx_flow_allow_all_protocol(const struct lws_protocols *protocol);
+lws_rx_flow_allow_all_protocol(const struct lws_context *context,
+                              const struct lws_protocols *protocol);

unfortunately the original apis can no longer be emulated and users of them must update.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-14 06:43:26 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
alloc.c Subject: [PATCH] Add custom allocator support using the realloc() interface 2014-12-05 07:25:24 +08:00
base64-decode.c mbed3 warning cleaning 2015-11-14 16:31:01 +08:00
client-handshake.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
client-parser.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
client.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
context.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
daemonize.c clean more whitespace 3 2015-12-06 08:40:00 +08:00
extension-deflate-frame.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
extension-deflate-frame.h make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
extension-deflate-stream.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
extension-deflate-stream.h make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
extension.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
getifaddrs.c Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
getifaddrs.h Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
handshake.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
header.c clean more whitespace 3 2015-12-06 08:40:00 +08:00
hpack.c clean more whitespace 5 2015-12-06 10:05:37 +08:00
http2.c clean more whitespace 5 2015-12-06 10:05:37 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lextable-strings.h Add PATCH, PUT, DELETE methods 2015-01-26 11:25:13 +08:00
lextable.h Add PATCH, PUT, DELETE methods 2015-01-26 11:25:13 +08:00
libev.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
libwebsockets.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
libwebsockets.h make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
lws-plat-mbed3.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
lws-plat-mbed3.cpp lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
lws-plat-unix.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
lws-plat-win.c win open flags 3 lsb are not bitfields 2015-12-14 06:40:53 +08:00
minihuf.c http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
minilex.c http2 able to send test.html to nghttp2 2014-10-12 14:31:47 +08:00
output.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
parsers.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
pollfd.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
private-libwebsockets.h make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
server-handshake.c make protocols const require explicit context API BREAK 2015-12-14 06:43:26 +08:00
server.c lws_get_ctx conversion 2015-12-14 06:43:24 +08:00
service.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
sha-1.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
ssl-http2.c clean more whitespace 4 2015-12-06 09:15:27 +08:00
ssl.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00