- lcount = select(max_socket + 1, &select_listen, NULL, NULL, NULL);
- if (lcount < 0)
+ if ((lcount = select(max_socket + 1, &select_listen, NULL, NULL, NULL)) < 0)
if (listen_socket[i] > 0 && FD_ISSET(listen_socket[i], &select_listen))
{
accept_socket = accept(listen_socket[i],
if (listen_socket[i] > 0 && FD_ISSET(listen_socket[i], &select_listen))
{
accept_socket = accept(listen_socket[i],
doesn't work for other tests (e.g. ident tests) so we have explicit '<' and
'>' flags for input and output as well as the defaults. */
doesn't work for other tests (e.g. ident tests) so we have explicit '<' and
'>' flags for input and output as well as the defaults. */
n = (read(dup_accept_socket, &c, 1) == 1 && c == '.');
if (content_length.in_use) content_length.left--;
while (c != '\n' && read(dup_accept_socket, &c, 1) == 1)
n = (read(dup_accept_socket, &c, 1) == 1 && c == '.');
if (content_length.in_use) content_length.left--;
while (c != '\n' && read(dup_accept_socket, &c, 1) == 1)
if (content_length.in_use) content_length.left -= (n - offset);
while (n > 0 && isspace(buffer[n-1])) n--;
buffer[n] = 0;
if (content_length.in_use) content_length.left -= (n - offset);
while (n > 0 && isspace(buffer[n-1])) n--;
buffer[n] = 0;