Merge pull request #330 from vanlink/dev

remove unnecessary one byte from html page
dev
logwang 2019-02-11 20:35:17 +08:00 committed by GitHub
commit 7206eaf36d
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ int loop(void *arg)
char buf[256];
size_t readlen = ff_read(clientfd, buf, sizeof(buf));
ff_write(clientfd, html, sizeof(html));
ff_write(clientfd, html, strlen(html));
} else {
printf("unknown event: %8.8X\n", event.flags);
}

View File

@ -89,7 +89,7 @@ int loop(void *arg)
char buf[256];
size_t readlen = ff_read( events[i].data.fd, buf, sizeof(buf));
if(readlen > 0) {
ff_write( events[i].data.fd, html, sizeof(html));
ff_write( events[i].data.fd, html, strlen(html));
} else {
ff_epoll_ctl(epfd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
ff_close( events[i].data.fd);