From 2fb80ebc7c977accc9066ec9fdbe71fb3c0f6f9e Mon Sep 17 00:00:00 2001 From: Tomasz Kojm Date: Tue, 28 Oct 2008 09:25:55 +0000 Subject: [PATCH] freshclam: re-enable --submit-stats (bb#1235) git-svn: trunk@4296 --- ChangeLog | 4 ++++ docs/man/freshclam.1.in | 3 +++ freshclam/freshclam.c | 12 ++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a13a1613..5b42dd6f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Oct 28 10:52:41 CET 2008 (tk) +--------------------------------- + * freshclam: re-enable --submit-stats (bb#1235) + Mon Oct 27 18:07:08 EET 2008 (edwin) ------------------------------------ * unit_tests/valgrind.supp: suppress valgrind warnings for old libc. diff --git a/docs/man/freshclam.1.in b/docs/man/freshclam.1.in index a33c9c964..af0408c8f 100644 --- a/docs/man/freshclam.1.in +++ b/docs/man/freshclam.1.in @@ -67,6 +67,9 @@ Execute COMMAND when freshclam reports outdated version. In the command string % .TP \fB\-\-list\-mirrors\fR Print mirror details from mirrors.dat (cache file for the mirror manager). +.TP +\fB\-\-submit\-stats[=/path/to/clamd.conf]\fR +Upload detection statistics to the ClamAV Project (see freshclam.conf(5):SubmitDetectionStats for more details). No database update will be performed. This option only works in the interactive mode. .SH "EXAMPLES" .LP .TP diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c index 6ae3e9188..092c1caf6 100644 --- a/freshclam/freshclam.c +++ b/freshclam/freshclam.c @@ -144,6 +144,7 @@ static void help(void) mprintf(" --on-error-execute=COMMAND execute COMMAND if errors occured\n"); mprintf(" --on-outdated-execute=COMMAND execute COMMAND when software is outdated\n"); mprintf(" --list-mirrors print mirrors from mirrors.dat\n"); + mprintf(" --submit-stats[=/path/clamd.conf] only submit detection statistics\n"); mprintf("\n"); } @@ -233,7 +234,7 @@ int main(int argc, char **argv) {"on-error-execute", 1, 0, 0}, {"on-outdated-execute", 1, 0, 0}, {"list-mirrors", 0, 0, 0}, - /* {"submit-stats", 2, 0, 0}, */ + {"submit-stats", 2, 0, 0}, {0, 0, 0, 0} }; @@ -580,11 +581,12 @@ int main(int argc, char **argv) } } else { - /* if(opt_check(opt, "submit-stats")) { cfgfile = opt_arg(opt, "submit-stats"); if(!cfgfile) cfgfile = CONFDIR"/clamd.conf"; + if(!opt_check(opt, "no-warnings")) + logg(" *** Virus databases are not updated in this mode ***\n"); ret = submitstats(cfgfile, copt); } else { ret = download(copt, opt, newdir, cfgfile); @@ -592,12 +594,6 @@ int main(int argc, char **argv) if((cpt = cfgopt(copt, "SubmitDetectionStats"))->enabled) submitstats(cpt->strarg, copt); } - */ - ret = download(copt, opt, newdir, cfgfile); - - if((cpt = cfgopt(copt, "SubmitDetectionStats"))->enabled) - submitstats(cpt->strarg, copt); - } if(ret > 1) {