From 891628b33c3bf2e4dc113edc51868a867a47b7eb Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 11 Dec 2015 13:12:58 +0800 Subject: 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 --- lib/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/server.c') 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) { -- cgit v1.2.3