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,
switch (reason) {
case LWS_CALLBACK_RECEIVE: {
char *rcv = in;
char rcv[len+1];
memcpy(rcv, in, len);
rcv[len] = 0;
struct ws_client *ws_client;
printf("lws receive: %s\n", rcv);
......@@ -836,6 +838,10 @@ static int callback_http(struct lws *wsi,
free(resource_path);
break;
}
case LWS_CALLBACK_HTTP_FILE_COMPLETION:
/* kill the connection after we sent one file */
r = -1;
break;
case LWS_CALLBACK_ADD_POLL_FD: {
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