git-svn: trunk@3023
Nigel Horne authored on 2007/04/18 19:15:09... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Wed Apr 18 10:22:13 BST 2007 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Fix problem where it wasn't waiting if multiple servers |
|
4 |
+ are given |
|
5 |
+ |
|
1 | 6 |
Wed Apr 18 04:49:50 BST 2007 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* clamav-milter: Wait longer for clamd to start on the localhost |
... | ... |
@@ -1542,8 +1542,8 @@ main(int argc, char **argv) |
1542 | 1542 |
*/ |
1543 | 1543 |
for(tries = 0; tries < NTRIES - 1; tries++) { |
1544 | 1544 |
if(pingServer(i)) |
1545 |
- break; |
|
1546 |
- if(!checkClamd(1)) |
|
1545 |
+ logg("ping OK\n"); |
|
1546 |
+ if(checkClamd(1)) /* will try all servers */ |
|
1547 | 1547 |
break; |
1548 | 1548 |
logg(_("Waiting for clamd to come up\n")); |
1549 | 1549 |
/* |
... | ... |
@@ -4555,7 +4555,7 @@ checkClamd(int log_result) |
4555 | 4555 |
if(!onlocal) { |
4556 | 4556 |
/* No local clamd, use pingServer() to tell */ |
4557 | 4557 |
for(i = 0; i < numServers; i++) |
4558 |
- if(pingServer(i)) |
|
4558 |
+ if(serverIPs[i] && pingServer(i)) |
|
4559 | 4559 |
return 1; |
4560 | 4560 |
if(log_result) |
4561 | 4561 |
logg(_("!Can't find any clamd server\n")); |