[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:21:08 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 6ce045e811b267e5043fe7ef5f8c32e180d1c0a0
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Tue Feb 16 16:27:53 2010 +0100
freshclam/manager.c: handle empty cdiffs more gently
diff --git a/ChangeLog b/ChangeLog
index 9dd1fca..fd04024 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 16 16:27:13 CET 2010 (tk)
+---------------------------------
+ * freshclam/manager.c: handle empty cdiffs more gently
+
Sun Feb 14 12:28:52 CET 2010 (acab)
-----------------------------------
* libclamav: refactor checkfp logic
diff --git a/freshclam/manager.c b/freshclam/manager.c
index f350730..ac2a3e0 100644
--- a/freshclam/manager.c
+++ b/freshclam/manager.c
@@ -1144,12 +1144,15 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
closesocket(sd);
close(fd);
- if(bread == -1 || !totaldownloaded) {
+ if(bread == -1) {
logg("%cgetfile: Download interrupted: %s (IP: %s)\n", logerr ? '!' : '^', strerror(errno), ipaddr);
mirman_update(mdat->currip, mdat->af, mdat, 2);
return 52;
}
+ if(!totaldownloaded)
+ return 53;
+
if(totalsize > 0)
logg("Downloading %s [%i%%]\n", srcfile, percentage);
else
@@ -1250,7 +1253,10 @@ static int getpatch(const char *dbname, const char *tmpdir, int version, const c
logg("*Retrieving http://%s/%s\n", hostname, patch);
if((ret = getfile(patch, tempname, hostname, ip, localip, proxy, port, user, pass, uas, ctimeout, rtimeout, mdat, logerr, can_whitelist))) {
- logg("%cgetpatch: Can't download %s from %s\n", logerr ? '!' : '^', patch, hostname);
+ if(ret == 53)
+ logg("Empty script %s, need to download entire database\n", patch);
+ else
+ logg("%cgetpatch: Can't download %s from %s\n", logerr ? '!' : '^', patch, hostname);
unlink(tempname);
free(tempname);
CHDIR_ERR(olddir);
@@ -1643,7 +1649,8 @@ static int updatedb(const char *dbname, const char *hostname, char *ip, int *sig
if(ret) {
cli_rmdirs(tmpdir);
free(tmpdir);
- logg("^Incremental update failed, trying to download %s\n", cvdfile);
+ if(ret != 53)
+ logg("^Incremental update failed, trying to download %s\n", cvdfile);
mirman_whitelist(mdat, 2);
ret = getcvd(cvdfile, newfile, hostname, ip, localip, proxy, port, user, pass, uas, newver, ctimeout, rtimeout, mdat, logerr, can_whitelist);
if(ret) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list