[evolution-data-server/gnome-2-30] Fix division-by-zero in imapx message fetch
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Fix division-by-zero in imapx message fetch
- Date: Mon, 28 Jun 2010 19:34:37 +0000 (UTC)
commit 528b1e8c0db12c5b4cdbccbbd45107fd4f54ac8a
Author: David Woodhouse <David Woodhouse intel com>
Date: Tue Jun 22 11:04:06 2010 +0100
Fix division-by-zero in imapx message fetch
Use ifolder->exists_on_server, not imap->exists (which could have come
from a STATUS command and be the value for some other folder).
And it's possible to get here when we thought there were no messages, so
add ?:1 to avoid the division by zero in that case too.
(cherry picked from commit 79107d2547812926f51343b23e551da794f2a8a7)
camel/providers/imapx/camel-imapx-server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index e11ac48..2cca90c 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1354,7 +1354,8 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
}
if (job->op)
- camel_operation_progress (job->op, (camel_folder_summary_count (job->folder->summary) * 100)/imap->exists);
+ camel_operation_progress (job->op, (camel_folder_summary_count (job->folder->summary)
+ * 100)/ifolder->exists_on_server?:1);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]