Browse code

honor readtimeout=0

git-svn: trunk@5030

aCaB authored on 2009/04/07 23:54:13
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Apr  7 16:53:18 CEST 2009 (acab)
2
+------------------------------------
3
+ * clamav-milter/netcode.c: honour ReadTimeout=0
4
+
1 5
 Tue Apr  7 12:32:14 CEST 2009 (tk)
2 6
 ----------------------------------
3 7
  * etc/clamd.conf: remove deprecated ArchiveLimitMemoryUsage (bb#1551)
... ...
@@ -237,7 +237,7 @@ char *nc_recv(int s) {
237 237
 	FD_ZERO(&fds);
238 238
 	FD_SET(s, &fds);
239 239
 
240
-	res = select(s+1, &fds, NULL, NULL, &tv);
240
+	res = select(s+1, &fds, NULL, NULL, readtimeout ? &tv : NULL);
241 241
 	if(res<1) {
242 242
 	    if (res != -1 || errno != EINTR)
243 243
 		timeout = 0;