[evolution-kolab/ek-wip-porting] KolabMailSynchronizer: build fixes, error handling fix
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] KolabMailSynchronizer: build fixes, error handling fix
- Date: Thu, 8 Dec 2011 14:19:44 +0000 (UTC)
commit 9900496a8fc4adde89f086a129b44ddda3c8e774
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Dec 8 14:29:34 2011 +0100
KolabMailSynchronizer: build fixes, error handling fix
* removed set-but-not-used variables
* in kolab_mail_synchronizer_uids_infosync(), added missing
warning if writing of a record to the InfoDb fails
(fixes lost GError memory)
src/libekolab/kolab-mail-synchronizer.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-synchronizer.c b/src/libekolab/kolab-mail-synchronizer.c
index 2408e11..5caa1fa 100644
--- a/src/libekolab/kolab-mail-synchronizer.c
+++ b/src/libekolab/kolab-mail-synchronizer.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/***************************************************************************
- * kolab-mail-synchonizer.h
+ * kolab-mail-synchonizer.c
*
* Thu Jan 20 11:49:12 2011
* Copyright 2011 Christian Hilberg
@@ -129,11 +129,11 @@ kolab_mail_synchronizer_dispose (GObject *object)
static void
kolab_mail_synchronizer_finalize (GObject *object)
{
- KolabMailSynchronizer *self = NULL;
- KolabMailSynchronizerPrivate *priv = NULL;
+ /* KolabMailSynchronizer *self = NULL; */
+ /* KolabMailSynchronizerPrivate *priv = NULL; */
- self = KOLAB_MAIL_SYNCHRONIZER (object);
- priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self);
+ /* self = KOLAB_MAIL_SYNCHRONIZER (object); */
+ /* priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self); */
/* TODO: Add deinitalization code here */
@@ -551,7 +551,7 @@ kolab_mail_synchronizer_folders_update_summary (KolabMailSynchronizer *self,
summary,
&tmp_err);
kolab_folder_summary_free (summary);
- if (tmp_err != NULL) {
+ if (! ok) {
g_propagate_error (err, tmp_err);
return FALSE;
}
@@ -835,7 +835,7 @@ kolab_mail_synchronizer_record_update_info (KolabMailSynchronizer *self,
KolabFolderContextID folder_context,
gboolean uidval_changed)
{
- KolabMailSynchronizerPrivate *priv = NULL;
+ /* KolabMailSynchronizerPrivate *priv = NULL; */
KolabObjectCacheLocation location = KOLAB_OBJECT_CACHE_LOCATION_INVAL;
KolabObjectCacheStatus status = KOLAB_OBJECT_CACHE_STATUS_INVAL;
const gchar *imapuid_sync = NULL;
@@ -853,7 +853,7 @@ kolab_mail_synchronizer_record_update_info (KolabMailSynchronizer *self,
g_assert (record != NULL);
/* imap_summary may be NULL */
- priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self);
+ /* priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self); */
/* needed at least for as long as InfoDb is not persistent */
if (record->summary == NULL)
@@ -1084,6 +1084,12 @@ kolab_mail_synchronizer_uids_infosync (KolabMailSynchronizer *self,
record,
foldername,
&tmp_err);
+ if (! ok) {
+ g_warning ("%s: %s",
+ __func__, tmp_err->message);
+ g_error_free (tmp_err);
+ tmp_err = NULL;
+ }
}
uid_skip:
if (record != NULL)
@@ -1404,7 +1410,7 @@ kolab_mail_synchronizer_handle_new_from_record (KolabMailSynchronizer *self,
const KolabMailInfoDbRecord *record,
GError **err)
{
- KolabMailSynchronizerPrivate *priv = NULL;
+ /* KolabMailSynchronizerPrivate *priv = NULL; */
KolabMailHandle *local_handle = NULL;
KolabMailSummary *summary = NULL;
gboolean ok = FALSE;
@@ -1416,7 +1422,7 @@ kolab_mail_synchronizer_handle_new_from_record (KolabMailSynchronizer *self,
g_assert (record != NULL);
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
- priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self);
+ /* priv = KOLAB_MAIL_SYNCHRONIZER_PRIVATE (self); */
summary = kolab_mail_summary_clone (record->summary);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]