diff options
-rw-r--r-- | opkg_download.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/opkg_download.c b/opkg_download.c index 3370b1f..fcc5294 100644 --- a/opkg_download.c +++ b/opkg_download.c @@ -46,6 +46,14 @@ curl_progress_func (char* url, #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; } |