]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/jwhois-4.0-select.patch
reiserfsprogs: Update to 3.6.27
[ipfire-2.x.git] / src / patches / jwhois-4.0-select.patch
CommitLineData
c5e5324c
MT
1diff -ur jwhois-4.0.old/src/whois.c jwhois-4.0/src/whois.c
2--- jwhois-4.0.old/src/whois.c 2007-06-26 03:00:29.000000000 -0400
3+++ jwhois-4.0/src/whois.c 2009-04-29 11:42:56.000000000 -0400
4@@ -115,6 +115,7 @@
5 unsigned int count, start_count;
6 int ret;
7 char data[MAXBUFSIZE];
8+ fd_set rfds;
9
10 count = 0;
11
12@@ -124,7 +125,15 @@
13
14 do
15 {
16+ FD_ZERO(&rfds);
17+ FD_SET(fd, &rfds);
18+ ret = select(fd + 1, &rfds, NULL, NULL, NULL);
19+
20+ if (ret <= 0)
21+ return -1;
22+
23 ret = read(fd, data, MAXBUFSIZE-1);
24+
25 if (ret >= 0)
26 {
27 count += ret;