git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@191 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/01/16 15:43:25... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Fri Jan 16 07:39:55 CET 2004 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * freshclam: removed -c for --config-file (conflicted with -c for --checks). |
|
4 |
+ Problem reported by Richard Stevenson <richard*endace.com>. |
|
5 |
+ |
|
1 | 6 |
Thu Jan 15 15:31:13 CET 2004 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* clamd: "ThreadTimeout 0" now properly disables the limit (thanks to |
... | ... |
@@ -284,7 +284,7 @@ void help(void) |
284 | 284 |
|
285 | 285 |
mprintf("\n"); |
286 | 286 |
mprintf(" Clam AntiVirus: freshclam "VERSION"\n"); |
287 |
- mprintf(" (c) 2002, 2003 Tomasz Kojm <tkojm@clamav.net>\n\n"); |
|
287 |
+ mprintf(" (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>\n\n"); |
|
288 | 288 |
|
289 | 289 |
mprintf(" --help -h show help\n"); |
290 | 290 |
mprintf(" --version -V print version number and exit\n"); |
... | ... |
@@ -294,12 +294,12 @@ void help(void) |
294 | 294 |
mprintf(" --stdout write to stdout instead of stderr\n"); |
295 | 295 |
mprintf(" (this help is always written to stdout)\n"); |
296 | 296 |
mprintf("\n"); |
297 |
- mprintf(" --config-file=FILE -c FILE Read configuration from FILE.\n"); |
|
297 |
+ mprintf(" --config-file=FILE Read configuration from FILE.\n"); |
|
298 | 298 |
mprintf(" --log=FILE -l FILE log into FILE\n"); |
299 | 299 |
mprintf(" --log-verbose log additional information\n"); |
300 | 300 |
mprintf(" --daemon -d run in daemon mode\n"); |
301 | 301 |
mprintf(" --user=USER -u USER run as USER\n"); |
302 |
- mprintf(" --checks=#n -c #n #n checks by day, 1 <= n <= 50\n"); |
|
302 |
+ mprintf(" --checks=#n -c #n number of checks per day, 1 <= n <= 50\n"); |
|
303 | 303 |
mprintf(" --datadir=DIRECTORY download new databases into DIRECTORY\n"); |
304 | 304 |
#ifdef BUILD_CLAMD |
305 | 305 |
mprintf(" --daemon-notify[=/path/clamav.conf] send RELOAD command to clamd\n"); |
... | ... |
@@ -262,7 +262,7 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip) |
262 | 262 |
int socketfd, port; |
263 | 263 |
struct sockaddr_in name; |
264 | 264 |
struct hostent *host; |
265 |
- char *portpt, *proxycpy = NULL, ipaddr[16]; |
|
265 |
+ char ipaddr[16]; |
|
266 | 266 |
unsigned char *ia; |
267 | 267 |
const char *hostpt; |
268 | 268 |
|
... | ... |
@@ -330,7 +330,7 @@ int wwwconnect(const char *server, const char *proxy, int pport, char *ip) |
330 | 330 |
/* TODO: use a HEAD instruction to see if the file has been changed */ |
331 | 331 |
struct cl_cvd *remote_cvdhead(const char *file, int socketfd, const char *hostname, const char *proxy, const char *user, const char *pass) |
332 | 332 |
{ |
333 |
- char cmd[512], head[513], buffer[FILEBUFF], *ch, *tmp, *userpass; |
|
333 |
+ char cmd[512], head[513], buffer[FILEBUFF], *ch, *tmp; |
|
334 | 334 |
int i, j, bread, cnt; |
335 | 335 |
char *remotename = NULL, *authorization = NULL; |
336 | 336 |
struct cl_cvd *cvd; |
... | ... |
@@ -504,7 +504,9 @@ int get_database(const char *dbfile, int socketfd, const char *file, const char |
504 | 504 |
write(fd, buffer, bread); |
505 | 505 |
mprintf("Downloading %s [%c]\r", dbfile, rotation[rot]); |
506 | 506 |
fflush(stdout); |
507 |
- rot = ++rot % 4; |
|
507 |
+ /* rot = ++rot % 4; -> operation on `rot' may be undefined (why ?) */ |
|
508 |
+ rot %= 4; |
|
509 |
+ rot++; |
|
508 | 510 |
} |
509 | 511 |
|
510 | 512 |
mprintf("Downloading %s [*]\n", dbfile); |
... | ... |
@@ -48,7 +48,7 @@ int main(int argc, char **argv) |
48 | 48 |
{"stdout", 0, 0, 0}, |
49 | 49 |
{"daemon", 0, 0, 'd'}, |
50 | 50 |
{"user", 1, 0, 'u'}, /* not used */ |
51 |
- {"config-file", 1, 0, 'c'}, |
|
51 |
+ {"config-file", 1, 0, 0}, |
|
52 | 52 |
{"checks", 1, 0, 'c'}, |
53 | 53 |
{"http-proxy", 1, 0, 0}, |
54 | 54 |
{"proxy-user", 1, 0, 0}, |