[evolution-data-server] Bug #707520 - New detached instance notification not send to clients



commit 21572af436ff68ceaa4258f7843c4effe5477904
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 5 09:38:01 2013 +0200

    Bug #707520 - New detached instance notification not send to clients

 calendar/libedata-cal/e-cal-backend.c |    6 +++---
 calendar/libedata-cal/e-data-cal.c    |   18 ++++++++++++------
 2 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index 47a38ce..781221d 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -2654,8 +2654,8 @@ e_cal_backend_modify_objects_finish (ECalBackend *backend,
                e_cal_backend_notify_component_modified (
                        backend, old_component, new_component);
 
-               g_object_unref (old_component);
-               g_object_unref (new_component);
+               g_clear_object (&old_component);
+               g_clear_object (&new_component);
        }
 
        g_warn_if_fail (g_queue_is_empty (old_component_queue));
@@ -4147,7 +4147,7 @@ e_cal_backend_notify_component_modified (ECalBackend *backend,
        GList *list, *link;
 
        g_return_if_fail (E_IS_CAL_BACKEND (backend));
-       g_return_if_fail (E_IS_CAL_COMPONENT (old_component));
+       g_return_if_fail (!old_component || E_IS_CAL_COMPONENT (old_component));
        g_return_if_fail (E_IS_CAL_COMPONENT (new_component));
 
        list = e_cal_backend_list_views (backend);
diff --git a/calendar/libedata-cal/e-data-cal.c b/calendar/libedata-cal/e-data-cal.c
index 8d774c0..17315b2 100644
--- a/calendar/libedata-cal/e-data-cal.c
+++ b/calendar/libedata-cal/e-data-cal.c
@@ -1796,10 +1796,13 @@ e_data_cal_respond_modify_objects (EDataCal *cal,
 
                list = (GSList *) old_components;
 
-               for (link = list; link != NULL; link = g_slist_next (link))
+               for (link = list; link != NULL; link = g_slist_next (link)) {
+                       if (link->data)
+                               g_object_ref (link->data);
                        g_queue_push_tail (
                                inner_queue,
-                               g_object_ref (link->data));
+                               link->data);
+               }
 
                g_queue_push_tail (queue, inner_queue);
 
@@ -1882,10 +1885,13 @@ e_data_cal_respond_remove_objects (EDataCal *cal,
 
                list = (GSList *) old_components;
 
-               for (link = list; link != NULL; link = g_slist_next (link))
+               for (link = list; link != NULL; link = g_slist_next (link)) {
+                       if (link->data)
+                               g_object_ref (link->data);
                        g_queue_push_tail (
                                inner_queue,
-                               g_object_ref (link->data));
+                               link->data);
+               }
 
                g_queue_push_tail (queue, inner_queue);
 
@@ -1899,8 +1905,8 @@ e_data_cal_respond_remove_objects (EDataCal *cal,
                        for (link = list; link != NULL; link = g_slist_next (link)) {
                                if (link->data != NULL)
                                        g_object_ref (link->data);
-                                       g_queue_push_tail (
-                                               inner_queue, link->data);
+                               g_queue_push_tail (
+                                       inner_queue, link->data);
                        }
 
                        g_queue_push_tail (queue, inner_queue);


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