1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-25 22:46:05 +03:00

Change to recv(), stop warning on close

This commit is contained in:
Erik Ekman 2006-06-05 15:22:29 +00:00
parent 43787fae12
commit f2b27f868e
2 changed files with 4 additions and 4 deletions

4
dns.c
View File

@ -133,10 +133,8 @@ int
dns_read(int fd, char *buf, int len)
{
int r;
int fromlen;
struct sockaddr_in from;
r = recvfrom(fd, buf, len, 0, (struct sockaddr*)&from, &fromlen);
r = recv(fd, buf, len, 0);
if (r < 0) {
perror("recvfrom");
}

View File

@ -56,7 +56,9 @@ tunnel(int tun_fd, int dns_fd)
i = select(MAX(tun_fd, dns_fd) + 1, &fds, NULL, NULL, &tv);
if(i < 0) {
if (running) {
warn("select");
}
return 1;
}