[gnome-settings-daemon] sharing: Fix warning on session exit
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] sharing: Fix warning on session exit
- Date: Fri, 14 Oct 2016 13:15:48 +0000 (UTC)
commit 46efb26c1d0c59e1663c49f8fd61e2ab5d0aa7de
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 13 12:09:41 2016 +0200
sharing: Fix warning on session exit
When exiting, the skeleton will call to stop the manager. After the
daemon is stopped, finalize() will call _stop() again, which will fail
because we've already closed the D-Bus connection.
gsd-sharing[1865]: About to stop gnome-user-share-webdav
gsd-sharing[1865]: g_dbus_connection_call_internal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
gsd-sharing[1865]: About to stop rygel
gsd-sharing[1865]: g_dbus_connection_call_internal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
gsd-sharing[1865]: About to stop vino-server
gsd-sharing[1865]: g_dbus_connection_call_internal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
plugins/sharing/gsd-sharing-manager.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c
index b2b6086..a9ce7d7 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -720,8 +720,11 @@ gsd_sharing_manager_stop (GsdSharingManager *manager)
{
g_debug ("Stopping sharing manager");
- manager->priv->sharing_status = GSD_SHARING_STATUS_OFFLINE;
- gsd_sharing_manager_sync_services (manager);
+ if (manager->priv->sharing_status == GSD_SHARING_STATUS_AVAILABLE &&
+ manager->priv->connection != NULL) {
+ manager->priv->sharing_status = GSD_SHARING_STATUS_OFFLINE;
+ gsd_sharing_manager_sync_services (manager);
+ }
if (manager->priv->cancellable) {
g_cancellable_cancel (manager->priv->cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]