repsonse parser

This commit is contained in:
Bjorn Andersson 2006-06-05 15:31:07 +00:00
parent f2b27f868e
commit cbdb3a9c7d

View file

@ -38,13 +38,11 @@ static int
tunnel(int tun_fd, int dns_fd) tunnel(int tun_fd, int dns_fd)
{ {
int i; int i;
fd_set fds;
struct timeval tv;
char buf[1024];
int buflen;
int read; int read;
fd_set fds;
char buf[1024];
struct timeval tv;
buflen = 1024;
while (running) { while (running) {
tv.tv_sec = 1; tv.tv_sec = 1;
tv.tv_usec = 0; tv.tv_usec = 0;
@ -69,7 +67,7 @@ tunnel(int tun_fd, int dns_fd)
} }
if(FD_ISSET(dns_fd, &fds)) { if(FD_ISSET(dns_fd, &fds)) {
read = dns_read(dns_fd, buf, buflen); read = dns_read(dns_fd, buf, sizeof(buf));
} }
} }
} }