[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Tomasz Kojm tkojm at clamav.net
Sun Apr 4 01:04:54 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 745bb067cee2f98763dfc51369270e4026595173
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Mon Sep 14 19:56:56 2009 +0200

    freshclam: return 0 instead of 1 when database is up-to-date (bb#1312)

diff --git a/ChangeLog b/ChangeLog
index 16c17d1..f995070 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Sep 14 19:52:01 CEST 2009 (tk)
+----------------------------------
+ * freshclam: return 0 instead of 1 when database is up-to-date (bb#1312)
+
 Mon Sep 14 13:56:42 CEST 2009 (tk)
 ----------------------------------
  * clamd/server-th.c: fix possible race condition when restarting clamuko
diff --git a/docs/man/freshclam.1.in b/docs/man/freshclam.1.in
index 82010ea..e11d6d5 100644
--- a/docs/man/freshclam.1.in
+++ b/docs/man/freshclam.1.in
@@ -87,9 +87,7 @@ Upload detection statistics to the ClamAV Project (see freshclam.conf(5):SubmitD
 .SH "RETURN CODES"
 Some return codes of freshclam can be overwritten with a built-in command EXIT_n which can be passed to \-\-on\-*\-execute, eg. \-\-on\-update\-execute=EXIT_1 will force freshclam to always return 1 after successful database update.
 .TP
-0 : Database successfully updated.
-.TP 
-1 : Database is up\-to\-date.
+0 : Database is up\-to\-date or successfully updated.
 .TP 
 40: Unknown option passed.
 .TP 
diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c
index b9cecac..25cbc04 100644
--- a/freshclam/freshclam.c
+++ b/freshclam/freshclam.c
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
 
     if((opts = optparse(NULL, argc, argv, 1, OPT_FRESHCLAM, 0, NULL)) == NULL) {
 	mprintf("!Can't parse command line options\n");
-	return 1;
+	return 40;
     }
 
     if(optget(opts, "help")->enabled) {
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
     if((opts = optparse(cfgfile, 0, NULL, 1, OPT_FRESHCLAM, 0, opts)) == NULL) {
 	fprintf(stderr, "ERROR: Can't open/parse the config file %s\n", pt);
 	free(pt);
-	return 1;
+	return 40;
     }
     free(pt);
 
diff --git a/freshclam/manager.c b/freshclam/manager.c
index bc06abc..f690c15 100644
--- a/freshclam/manager.c
+++ b/freshclam/manager.c
@@ -1932,5 +1932,5 @@ int downloadmanager(const struct optstruct *opts, const char *hostname, const ch
     if(newver)
 	free(newver);
 
-    return updated ? 0 : 1;
+    return 0;
 }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list