From c19517392d357454e064b870efd7f8819e44b8a5 Mon Sep 17 00:00:00 2001 From: lxsang Date: Tue, 25 Aug 2020 17:16:53 +0200 Subject: [PATCH] update to the new lib --- cgi.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/cgi.c b/cgi.c index 05e1b2c..f3b8033 100644 --- a/cgi.c +++ b/cgi.c @@ -1,7 +1,12 @@ #define PLUGIN_IMPLEMENT 1 +#include +#include +#include #include #include -#include "antd/ini.h" +#include +#include +#include #define MAX_ENV_SIZE 100 @@ -342,21 +347,6 @@ void *handle(void *data) // send out the rest of data while (1) { - /*FD_ZERO(&rfd); - FD_SET(inpipefd[0], &rfd); - timeout.tv_sec = 0; - timeout.tv_usec = 500; - count = select(inpipefd[0]+1, &rfd, NULL, NULL, &timeout); - if(count == 0) - { - continue; - } - if(count == -1) - { - ERROR("select: %s", strerror(errno)); - break; - }*/ - // there is data comming count = read(inpipefd[0], buf, BUFFLEN); if (count == -1) @@ -382,11 +372,7 @@ void *handle(void *data) } else { - int cnt = antd_send(cl, buf, count); - /*if(cnt != count) - { - ERROR("Cannot sent the entire data %d vs %d", cnt, count); - }*/ + UNUSED(antd_send(cl, buf, count)); } }