[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:10:29 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 33ab5c3c85c68cde82542db90a96d8a80db82c05
Author: Tomasz Kojm <tkojm at clamav.net>
Date:   Fri Dec 4 15:59:20 2009 +0100

    freshclam/manager.c: improve handling of problematic mirrors (bb#1758)

diff --git a/ChangeLog b/ChangeLog
index d6da769..650aa13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Dec  4 15:55:51 CET 2009 (tk)
+---------------------------------
+ * freshclam/manager.c: improve handling of problematic mirrors (bb#1758)
+
 Fri Dec  4 14:19:23 CET 2009 (tk)
 ---------------------------------
  * clamscan: properly describe --include/exclude (bb#1765)
diff --git a/freshclam/manager.c b/freshclam/manager.c
index e5925cb..5159af1 100644
--- a/freshclam/manager.c
+++ b/freshclam/manager.c
@@ -1126,10 +1126,9 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
 	    return 57; /* FIXME */
 	}
 
-        if(totalsize > 0) {
-	    totaldownloaded += bread;
+	totaldownloaded += bread;
+        if(totalsize > 0)
             percentage = (int) (100 * (float) totaldownloaded / totalsize);
-	}
 
         if(!mprintf_quiet) {
             if(totalsize > 0) {
@@ -1145,9 +1144,9 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
     closesocket(sd);
     close(fd);
 
-    if(bread == -1) {
+    if(bread == -1 || !totaldownloaded) {
 	logg("%cgetfile: Download interrupted: %s (IP: %s)\n", logerr ? '!' : '^', strerror(errno), ipaddr);
-	mirman_update(mdat->currip, mdat->af, mdat, 1);
+	mirman_update(mdat->currip, mdat->af, mdat, 2);
 	return 52;
     }
 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list