** Fix for bug #576424
authorMilan Crha <mcrha@redhat.com>
Mon, 23 Mar 2009 17:57:40 +0000 (17:57 +0000)
committerMilan Crha <mcrha@src.gnome.org>
Mon, 23 Mar 2009 17:57:40 +0000 (17:57 +0000)
2009-03-23  Milan Crha  <mcrha@redhat.com>

** Fix for bug #576424

* backends/caldav/e-cal-backend-caldav.c: (process_object),
(caldav_receive_objects): Do not unref object twice and
treat icalcomponent as it, not as icaltimezone.

svn path=/trunk/; revision=10190

calendar/ChangeLog
calendar/backends/caldav/e-cal-backend-caldav.c

index 8658d8b..b2ceb5b 100644 (file)
@@ -1,3 +1,11 @@
+2009-03-23  Milan Crha  <mcrha@redhat.com>
+
+       ** Fix for bug #576424
+
+       * backends/caldav/e-cal-backend-caldav.c: (process_object),
+       (caldav_receive_objects): Do not unref object twice and
+       treat icalcomponent as it, not as icaltimezone.
+
 2009-03-05  Chenthill Palanisamy  <pchenthill@novell.com>
 
        Fixes #479908
index dbfc3ca..31a7fcc 100644 (file)
@@ -2471,7 +2471,6 @@ process_object (ECalBackendCalDAV   *cbdav,
                        break;
        }
 
-       g_object_unref (ecomp);
        g_free (ostr);
        g_free (oostr);
        g_free (rid);
@@ -2522,9 +2521,13 @@ caldav_receive_objects (ECalBackendSync *backend,
 
        if (status == GNOME_Evolution_Calendar_Success) {
                for (iter = timezones; iter; iter = iter->next) {
-                       icaltimezone *zone = iter->data;
+                       icaltimezone *zone = icaltimezone_new ();
+
+                       if (icaltimezone_set_component (zone, iter->data))
+                               e_cal_backend_cache_put_timezone (priv->cache, zone);
+                       else
+                               icalcomponent_free (iter->data);
 
-                       e_cal_backend_cache_put_timezone (priv->cache, zone);
                        icaltimezone_free (zone, TRUE);
                }
        }