[gnome-settings-daemon] sharing: don't shutdown rygel if not autostarted
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] sharing: don't shutdown rygel if not autostarted
- Date: Wed, 25 Jun 2014 10:57:56 +0000 (UTC)
commit 7b2feefe11ffa5020c3b0ecdf63ee4cab75bffbf
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Jun 25 12:26:59 2014 +0200
sharing: don't shutdown rygel if not autostarted
Rygel is also dbus activated, so we should not call it unless
we know it is running.
https://bugzilla.gnome.org/show_bug.cgi?id=732218
plugins/sharing/gsd-sharing-manager.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c
index 8457e23..4842183 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -666,9 +666,10 @@ gsd_sharing_manager_disable_rygel (void)
path = g_build_filename (g_get_user_config_dir (), "autostart",
"rygel.desktop", NULL);
- if (g_file_test (path, G_FILE_TEST_IS_SYMLINK | G_FILE_TEST_IS_REGULAR))
- g_unlink (path);
- g_free (path);
+ if (!g_file_test (path, G_FILE_TEST_IS_SYMLINK | G_FILE_TEST_IS_REGULAR))
+ goto out;
+
+ g_unlink (path);
connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (connection) {
@@ -677,6 +678,9 @@ gsd_sharing_manager_disable_rygel (void)
NULL, NULL, NULL);
}
g_object_unref (connection);
+
+ out:
+ g_free (path);
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]