[evolution-data-server] imapx_command_fetch_message_done(): Avoid a refcount issue.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] imapx_command_fetch_message_done(): Avoid a refcount issue.
- Date: Sun, 25 Mar 2012 22:45:21 +0000 (UTC)
commit 06f697d04e7141a0c58821ef86fbdc97d0933e42
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Mar 23 15:49:43 2012 -0400
imapx_command_fetch_message_done(): Avoid a refcount issue.
Fix a potential reference counting issue, but I don't think this is
what's causing all the problems.
camel/providers/imapx/camel-imapx-server.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 13a4bc1..15908a4 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3158,23 +3158,27 @@ imapx_command_fetch_message_done (CamelIMAPXServer *is,
* time) until the data actually stop coming. */
if (data->fetch_offset < data->size ||
data->fetch_offset == really_fetched) {
- camel_imapx_command_unref (ic);
+ CamelIMAPXCommand *new_ic;
+
camel_operation_progress (
job->cancellable,
(data->fetch_offset *100) / data->size);
- ic = camel_imapx_command_new (
+ new_ic = camel_imapx_command_new (
is, "FETCH", job->folder,
"UID FETCH %t (BODY.PEEK[]",
data->uid);
- camel_imapx_command_add (ic, "<%u.%u>", data->fetch_offset, MULTI_SIZE);
- camel_imapx_command_add (ic, ")");
- ic->complete = imapx_command_fetch_message_done;
- ic->job = job;
- ic->pri = job->pri - 1;
+ camel_imapx_command_add (new_ic, "<%u.%u>", data->fetch_offset, MULTI_SIZE);
+ camel_imapx_command_add (new_ic, ")");
+ new_ic->complete = imapx_command_fetch_message_done;
+ new_ic->job = job;
+ new_ic->pri = job->pri - 1;
data->fetch_offset += MULTI_SIZE;
job->commands++;
- imapx_command_queue (is, ic);
+ imapx_command_queue (is, new_ic);
+
+ camel_imapx_command_unref (ic);
+
return TRUE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]