diff options
author | Andy Green <andy.green@linaro.org> | 2015-12-11 13:12:58 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2015-12-14 06:43:35 +0800 |
commit | 891628b33c3bf2e4dc113edc51868a867a47b7eb (patch) | |
tree | 492361b799e001a8b6f9b3810e2d623191c995c7 /lib/server.c | |
parent | d2ac22c27abf34d3cccb3a6fe1e2c6d92123f436 (diff) | |
download | libwebsockets-891628b33c3bf2e4dc113edc51868a867a47b7eb.tar.gz libwebsockets-891628b33c3bf2e4dc113edc51868a867a47b7eb.tar.bz2 libwebsockets-891628b33c3bf2e4dc113edc51868a867a47b7eb.zip |
lws_plat_fd add wsi to fops and helpers
Having the lws_context alone doesn't let us track state or act different
by wsi, which is the most interesting usecase. Eg not only simply track
file position / decompression state per wsi but also act differently
according to wsi authentication state / associated cookies.
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'lib/server.c')
-rw-r--r-- | lib/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/server.c b/lib/server.c index 7e774eff..9fe069ef 100644 --- a/lib/server.c +++ b/lib/server.c @@ -916,7 +916,7 @@ LWS_VISIBLE int lws_serve_http_file(struct lws_context *context, LWS_SEND_BUFFER_PRE_PADDING; int ret = 0; - wsi->u.http.fd = lws_plat_file_open(&context->fops, file, + wsi->u.http.fd = lws_plat_file_open(wsi, file, &wsi->u.http.filelen, O_RDONLY); if (wsi->u.http.fd == LWS_INVALID_FILE) { |