r3926 - trunk/src/target/opkg
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Tue Jan 22 18:34:39 CET 2008
Author: thomas
Date: 2008-01-22 18:34:38 +0100 (Tue, 22 Jan 2008)
New Revision: 3926
Modified:
trunk/src/target/opkg/opkg_download.c
Log:
opkg: don't report the same download percentage multiple times
Modified: trunk/src/target/opkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/opkg_download.c 2008-01-22 17:11:11 UTC (rev 3925)
+++ trunk/src/target/opkg/opkg_download.c 2008-01-22 17:34:38 UTC (rev 3926)
@@ -46,6 +46,14 @@
#ifdef OPKG_LIB
if (opkg_cb_download_progress)
{
+ static int prev = -1;
+
+ /* don't report the same percentage multiple times
+ * (this can occur due to rounding) */
+ if (prev == p)
+ return 0;
+ prev = p;
+
opkg_cb_download_progress (p, url);
return 0;
}
More information about the commitlog
mailing list