Commit ef66e84e authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Update console_httpd to new libwebsockets

parent 1da7ba1a
...@@ -692,7 +692,9 @@ static int callback_http(struct lws *wsi, ...@@ -692,7 +692,9 @@ static int callback_http(struct lws *wsi,
switch (reason) { switch (reason) {
case LWS_CALLBACK_RECEIVE: { case LWS_CALLBACK_RECEIVE: {
char *rcv = in; char rcv[len+1];
memcpy(rcv, in, len);
rcv[len] = 0;
struct ws_client *ws_client; struct ws_client *ws_client;
printf("lws receive: %s\n", rcv); printf("lws receive: %s\n", rcv);
...@@ -836,7 +838,11 @@ static int callback_http(struct lws *wsi, ...@@ -836,7 +838,11 @@ static int callback_http(struct lws *wsi,
free(resource_path); free(resource_path);
break; break;
} }
case LWS_CALLBACK_HTTP_FILE_COMPLETION:
/* kill the connection after we sent one file */
r = -1;
break;
case LWS_CALLBACK_ADD_POLL_FD: { case LWS_CALLBACK_ADD_POLL_FD: {
struct lws_pollargs *args = in; struct lws_pollargs *args = in;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment