[evolution-kolab/ek-wip-porting] kolab-util-calendar: fixups in kolab_util_calendar_store()



commit 0dc03bc534c8f217e99c281cf0701bd6eb5bcc11
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Mar 19 14:54:43 2012 +0100

    kolab-util-calendar: fixups in kolab_util_calendar_store()
    
    * default timezone argument
      - may be NULL (don't assert otherwise)
      - is unused (explicitly ignore it)
    * turn PFB trigger failure into warning
      (this is not fatal to object storing)

 src/calendar/kolab-util-calendar.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/kolab-util-calendar.c b/src/calendar/kolab-util-calendar.c
index 46ec86e..2c394c0 100644
--- a/src/calendar/kolab-util-calendar.c
+++ b/src/calendar/kolab-util-calendar.c
@@ -317,7 +317,7 @@ kolab_util_calendar_store (ECalComponent *ecalcomp,
 
 	g_assert (E_IS_CAL_COMPONENT (ecalcomp));
 	/* ecaltz may be NULL */
-	g_assert (E_IS_CAL_COMPONENT (default_tz));
+	(void)default_tz; /* FIXME needed? */ /* default_tz may be NULL */
 	g_assert (KOLAB_IS_MAIL_ACCESS (koma));
 	g_assert (uri != NULL);
 	/* cancellable may be NULL */
@@ -359,10 +359,22 @@ kolab_util_calendar_store (ECalComponent *ecalcomp,
 	if (tmp_err != NULL)
 		goto cleanup;
 
-	if (do_trigger == TRUE)
+	if (do_trigger == TRUE) {
 		(void) kolab_util_calendar_toggle_pfb_trigger (ksettings,
 		                                               sourcename,
 		                                               &tmp_err);
+		if (tmp_err != NULL) {
+			/* if triggering the XFB generation fails,
+			 * this is not a critical failure regarding
+			 * storing the PIM object
+			 */
+			g_warning ("%s()[%u] %s",
+			           __func__, __LINE__, tmp_err->message);
+			g_error_free (tmp_err);
+			tmp_err = NULL;
+		}
+	}
+
  cleanup:
 	g_object_unref (ksettings);
 	g_free (sourcename);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]