mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
![]() The info struct is too fragile against additions being able to keep soname. Because if we add something, the library can't count on the user code being built against latest headers with largest info struct size. Then the user code may not have zeroed down enough of the struct and give us junk in the new members. Add a pool at the end of the info struct that exists so it will be zeroed down even though no current use for those future members, then later library versions can compatibly use them without breaking soname if it is understood 0 means default. Because keeping sizeof info straight if you add something is now a thing, also add an lwsl_info letting you confirm it easily. It's fine if the size of info differs on different platforms. But when we add things to the struct we need to balance the padding using a scheme like short new_member; unsigned char _padding1[sizeof(void *) - sizeof(short)]; which is immune to differences in platform differences in sizeof void *. Signed-off-by: Andy Green <andy.green@linaro.org> |
||
---|---|---|
.. | ||
.gitignore | ||
alloc.c | ||
base64-decode.c | ||
client-handshake.c | ||
client-parser.c | ||
client.c | ||
context.c | ||
daemonize.c | ||
extension-deflate-frame.c | ||
extension-deflate-frame.h | ||
extension-deflate-stream.c | ||
extension-deflate-stream.h | ||
extension.c | ||
getifaddrs.c | ||
getifaddrs.h | ||
handshake.c | ||
header.c | ||
hpack.c | ||
http2.c | ||
huftable.h | ||
lextable-strings.h | ||
lextable.h | ||
libev.c | ||
libwebsockets.c | ||
libwebsockets.h | ||
lws-plat-mbed3.c | ||
lws-plat-mbed3.cpp | ||
lws-plat-unix.c | ||
lws-plat-win.c | ||
minihuf.c | ||
minilex.c | ||
output.c | ||
parsers.c | ||
pollfd.c | ||
private-libwebsockets.h | ||
server-handshake.c | ||
server.c | ||
service.c | ||
sha-1.c | ||
ssl-http2.c | ||
ssl.c |