Don't ignore retval of read() in reqs.c

This commit is contained in:
Mukund Sivaraman 2009-09-23 07:22:17 +05:30
parent 003df7454a
commit 1586b39138

View File

@ -766,8 +766,16 @@ static int pull_client_data (struct conn_s *connptr, long int length)
if (len < 0 && errno != EAGAIN) if (len < 0 && errno != EAGAIN)
goto ERROR_EXIT; goto ERROR_EXIT;
if (len == 2 && CHECK_CRLF (buffer, len)) if ((len == 2) && CHECK_CRLF (buffer, len)) {
read (connptr->client_fd, buffer, 2); ssize_t ret;
ret = read (connptr->client_fd, buffer, 2);
if (ret == -1) {
log_message
(LOG_WARNING,
"Could not read two bytes from POST message");
}
}
safefree (buffer); safefree (buffer);
return 0; return 0;