rhythmbox r5863 - in trunk: . podcast
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5863 - in trunk: . podcast
- Date: Sat, 23 Aug 2008 13:42:34 +0000 (UTC)
Author: jmatthew
Date: Sat Aug 23 13:42:33 2008
New Revision: 5863
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5863&view=rev
Log:
2008-08-23 Jonathan Matthew <jonathan d14n org>
* podcast/rb-podcast-manager.c: (download_progress),
(podcast_download_thread):
Fix overflows in progress percentage calculation.
Modified:
trunk/ChangeLog
trunk/podcast/rb-podcast-manager.c
Modified: trunk/podcast/rb-podcast-manager.c
==============================================================================
--- trunk/podcast/rb-podcast-manager.c (original)
+++ trunk/podcast/rb-podcast-manager.c Sat Aug 23 13:42:33 2008
@@ -1270,16 +1270,16 @@
}
static void
-download_progress (RBPodcastManagerInfo *data, gsize downloaded, guint64 total, gboolean complete)
+download_progress (RBPodcastManagerInfo *data, guint64 downloaded, guint64 total, gboolean complete)
{
guint local_progress = 0;
- rb_debug ("%s: %lu / %" G_GUINT64_FORMAT,
+ rb_debug ("%s: %" G_GUINT64_FORMAT "/ %" G_GUINT64_FORMAT,
rhythmdb_entry_get_string (data->entry, RHYTHMDB_PROP_LOCATION),
- (gulong)downloaded, total);
+ downloaded, total);
if (downloaded > 0 && total > 0)
- local_progress = (gint) (100 * downloaded) / total;
+ local_progress = (100 * downloaded) / total;
if (local_progress != data->progress) {
GValue val = {0,};
@@ -1331,7 +1331,7 @@
char buf[8192];
gssize n_read;
gssize n_written;
- gsize downloaded;
+ guint64 downloaded;
/* open remote file */
data->in_stream = g_file_read (data->source, data->cancel, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]