[evolution-data-server] EDataCalFactory: Always watch sender's bus name.



commit ee2b94df4b153f9f376dc7f44501874af05012df
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Aug 15 15:30:54 2013 -0400

    EDataCalFactory: Always watch sender's bus name.
    
    Watch the sender's bus name on every new connection so we can clean up
    its connections if the bus name vanishes (e.g. client program crashes).
    
    Previously we were only watching the sender's bus name if the backend
    instance was created for that connection, but that was unintentional.

 calendar/libedata-cal/e-data-cal-factory.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 098b6ca..c4bca54 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -341,9 +341,6 @@ data_cal_factory_open (EDataCalFactory *factory,
                        connection, object_path, error);
 
                if (data_cal != NULL) {
-                       data_cal_factory_watched_names_add (
-                               factory, connection, sender);
-
                        g_signal_connect_object (
                                backend, "closed",
                                G_CALLBACK (data_cal_factory_closed_cb),
@@ -356,6 +353,11 @@ data_cal_factory_open (EDataCalFactory *factory,
        }
 
        if (data_cal != NULL) {
+               /* Watch the sender's bus name so we can clean
+                * up its connections if the bus name vanishes. */
+               data_cal_factory_watched_names_add (
+                       factory, connection, sender);
+
                /* A client may create multiple EClient instances for the
                 * same ESource, each of which calls close() individually.
                 * So we must track each and every connection made. */


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