freshclam: re-enable --submit-stats (bb#1235)

git-svn: trunk@4296
0.95
Tomasz Kojm 17 years ago
parent 02157f0821
commit 2fb80ebc7c
  1. 4
      ChangeLog
  2. 3
      docs/man/freshclam.1.in
  3. 12
      freshclam/freshclam.c

@ -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) Mon Oct 27 18:07:08 EET 2008 (edwin)
------------------------------------ ------------------------------------
* unit_tests/valgrind.supp: suppress valgrind warnings for old libc. * unit_tests/valgrind.supp: suppress valgrind warnings for old libc.

@ -67,6 +67,9 @@ Execute COMMAND when freshclam reports outdated version. In the command string %
.TP .TP
\fB\-\-list\-mirrors\fR \fB\-\-list\-mirrors\fR
Print mirror details from mirrors.dat (cache file for the mirror manager). 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" .SH "EXAMPLES"
.LP .LP
.TP .TP

@ -144,6 +144,7 @@ static void help(void)
mprintf(" --on-error-execute=COMMAND execute COMMAND if errors occured\n"); mprintf(" --on-error-execute=COMMAND execute COMMAND if errors occured\n");
mprintf(" --on-outdated-execute=COMMAND execute COMMAND when software is outdated\n"); mprintf(" --on-outdated-execute=COMMAND execute COMMAND when software is outdated\n");
mprintf(" --list-mirrors print mirrors from mirrors.dat\n"); mprintf(" --list-mirrors print mirrors from mirrors.dat\n");
mprintf(" --submit-stats[=/path/clamd.conf] only submit detection statistics\n");
mprintf("\n"); mprintf("\n");
} }
@ -233,7 +234,7 @@ int main(int argc, char **argv)
{"on-error-execute", 1, 0, 0}, {"on-error-execute", 1, 0, 0},
{"on-outdated-execute", 1, 0, 0}, {"on-outdated-execute", 1, 0, 0},
{"list-mirrors", 0, 0, 0}, {"list-mirrors", 0, 0, 0},
/* {"submit-stats", 2, 0, 0}, */ {"submit-stats", 2, 0, 0},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
@ -580,11 +581,12 @@ int main(int argc, char **argv)
} }
} else { } else {
/*
if(opt_check(opt, "submit-stats")) { if(opt_check(opt, "submit-stats")) {
cfgfile = opt_arg(opt, "submit-stats"); cfgfile = opt_arg(opt, "submit-stats");
if(!cfgfile) if(!cfgfile)
cfgfile = CONFDIR"/clamd.conf"; cfgfile = CONFDIR"/clamd.conf";
if(!opt_check(opt, "no-warnings"))
logg(" *** Virus databases are not updated in this mode ***\n");
ret = submitstats(cfgfile, copt); ret = submitstats(cfgfile, copt);
} else { } else {
ret = download(copt, opt, newdir, cfgfile); ret = download(copt, opt, newdir, cfgfile);
@ -592,12 +594,6 @@ int main(int argc, char **argv)
if((cpt = cfgopt(copt, "SubmitDetectionStats"))->enabled) if((cpt = cfgopt(copt, "SubmitDetectionStats"))->enabled)
submitstats(cpt->strarg, copt); submitstats(cpt->strarg, copt);
} }
*/
ret = download(copt, opt, newdir, cfgfile);
if((cpt = cfgopt(copt, "SubmitDetectionStats"))->enabled)
submitstats(cpt->strarg, copt);
} }
if(ret > 1) { if(ret > 1) {

Loading…
Cancel
Save