summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2010-03-30 14:29:50 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2010-03-30 14:29:50 +0200
commit3048b879b6f633f86204aef5ddb6c808bbd462d4 (patch)
tree12fa5e2b018b4cf4683dd9fd03f8c9430a012222
parent61f372eca5241ebf95778eeb3a601976d834bc32 (diff)
e_cal_check_timezones(): broken in EDS 2.30 due to change of error code (GNOME Bugzilla #611558, Moblin Bugzilla #9820)
The move to D-Bus changed the error code for "timezone cannot be retrieved because it doesn't exist" from E_CALENDAR_STATUS_OBJECT_NOT_FOUND to E_CALENDAR_STATUS_INVALID_OBJECT. That latter error code was not recognized by the code and caused e_cal_check_timezones() to fail with that error ("Could not retrieve calendar time zone"). This patch fixes the problem by recognizing both the old and the new error code.
-rw-r--r--src/backends/evolution/e-cal-check-timezones.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backends/evolution/e-cal-check-timezones.c b/src/backends/evolution/e-cal-check-timezones.c
index 6f27d080..d764e559 100644
--- a/src/backends/evolution/e-cal-check-timezones.c
+++ b/src/backends/evolution/e-cal-check-timezones.c
@@ -461,7 +461,8 @@ icaltimezone *e_cal_tzlookup_ecal(const char *tzid,
} else {
g_assert(*error);
if ((*error)->domain == E_CALENDAR_ERROR &&
- (*error)->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND) {
+ ((*error)->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND /* EDS < 2.30 */ ||
+ (*error)->code == E_CALENDAR_STATUS_INVALID_OBJECT /* EDS >= 2.30 */ )) {
/*
* we had to trigger this error to check for the timezone existance,
* clear it and return NULL