From: Matthew Barnes Date: Mon, 4 Feb 2013 16:08:08 +0000 (-0500) Subject: ECalClient: Avoid race between dispose() and signal handlers. X-Git-Tag: upstream/3.7.91~232 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe4be1098a86e97e4d666e7c0eb6378f8674a04c;p=platform%2Fupstream%2Fevolution-data-server.git ECalClient: Avoid race between dispose() and signal handlers. Use g_signal_connect_object() to ensure the GDBusProxy stays alive while its signal handlers are running. --- diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c index 7b97192..0b5b233 100644 --- a/calendar/libecal/e-cal-client.c +++ b/calendar/libecal/e-cal-client.c @@ -1196,19 +1196,22 @@ cal_client_init_in_dbus_thread (GSimpleAsyncResult *simple, connection, "closed", G_CALLBACK (gdbus_cal_client_closed_cb), client); - handler_id = g_signal_connect ( + handler_id = g_signal_connect_object ( priv->dbus_proxy, "error", - G_CALLBACK (cal_client_dbus_proxy_error_cb), client); + G_CALLBACK (cal_client_dbus_proxy_error_cb), + client, 0); priv->dbus_proxy_error_handler_id = handler_id; - handler_id = g_signal_connect ( + handler_id = g_signal_connect_object ( priv->dbus_proxy, "notify", - G_CALLBACK (cal_client_dbus_proxy_notify_cb), client); + G_CALLBACK (cal_client_dbus_proxy_notify_cb), + client, 0); priv->dbus_proxy_notify_handler_id = handler_id; - handler_id = g_signal_connect ( + handler_id = g_signal_connect_object ( priv->dbus_proxy, "free-busy-data", - G_CALLBACK (cal_client_dbus_proxy_free_busy_data_cb), client); + G_CALLBACK (cal_client_dbus_proxy_free_busy_data_cb), + client, 0); priv->dbus_proxy_free_busy_data_handler_id = handler_id; /* Initialize our public-facing GObject properties. */