git-svn: trunk@3491
Nigel Horne authored on 2008/01/10 20:52:42... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Thu Jan 10 11:23:32 GMT 2008 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * clamav-milter: Use new cli_rndnum API - thanks to TK for spotting |
|
4 |
+ this one |
|
5 |
+ |
|
1 | 6 |
Wed Jan 9 20:13:52 CET 2008 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* libclamav/others.c: improve cli_rndnum() and cli_gentempfd() |
... | ... |
@@ -33,7 +33,7 @@ |
33 | 33 |
*/ |
34 | 34 |
static char const rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $"; |
35 | 35 |
|
36 |
-#define CM_VERSION "devel-20071229" |
|
36 |
+#define CM_VERSION "devel-20080110" |
|
37 | 37 |
|
38 | 38 |
#if HAVE_CONFIG_H |
39 | 39 |
#include "clamav-config.h" |
... | ... |
@@ -2421,11 +2421,9 @@ findServer(void) |
2421 | 2421 |
j = 0; |
2422 | 2422 |
} else |
2423 | 2423 |
/* |
2424 |
- * cli_rndnum returns 0..(max-1) - the max argument is not |
|
2425 |
- * the maximum number you want it to return, it is in fact |
|
2426 |
- * one *more* than the maximum number you want it to return |
|
2424 |
+ * cli_rndnum returns 0..max |
|
2427 | 2425 |
*/ |
2428 |
- j = cli_rndnum(numServers); |
|
2426 |
+ j = cli_rndnum(numServers - 1); |
|
2429 | 2427 |
|
2430 | 2428 |
for(i = 0; i < numServers; i++) |
2431 | 2429 |
socks[i].sock = -1; |
... | ... |
@@ -5954,7 +5952,7 @@ print_trace(void) |
5954 | 5954 |
* clamav-milter before I put this check in! |
5955 | 5955 |
* |
5956 | 5956 |
* FIXME: return different codes for "the value is wrong" and "sendmail.cf" |
5957 |
- * hasn't been set up |
|
5957 |
+ * hasn't been set up, though that's not so easy to work out. |
|
5958 | 5958 |
*/ |
5959 | 5959 |
static int |
5960 | 5960 |
verifyIncomingSocketName(const char *sockName) |