read_tcp_data() fix to get the proper buffer pointer and size

pull/1/head
Daniel Stenberg 19 years ago
parent c24e66c057
commit 006698a1ed
  1. 4
      ares_process.c

@ -213,8 +213,8 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now)
* what's left to read of it). * what's left to read of it).
*/ */
count = recv(server->tcp_socket, count = recv(server->tcp_socket,
(void *)(server->tcp_lenbuf + server->tcp_buffer_pos), (void *)(server->tcp_lenbuf + server->tcp_lenbuf_pos),
2 - server->tcp_buffer_pos, 0); 2 - server->tcp_lenbuf_pos, 0);
if (count <= 0) if (count <= 0)
{ {
handle_error(channel, i, now); handle_error(channel, i, now);

Loading…
Cancel
Save