diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2012-03-02 11:34:50 -0500 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2012-03-02 11:34:50 -0500 |
commit | 90b7db3502bdba472d8d5d914f70bb316746e072 (patch) | |
tree | 5537a7b33d2f49b584286b7c0e9fca242d25d969 /src/sound-service-dbus.c | |
parent | 35442241ba01a563a5295918b58878a47b644f63 (diff) | |
parent | 068f00cdfe7512aab9054af728e361226dcc9511 (diff) | |
download | ayatana-indicator-sound-90b7db3502bdba472d8d5d914f70bb316746e072.tar.gz ayatana-indicator-sound-90b7db3502bdba472d8d5d914f70bb316746e072.tar.bz2 ayatana-indicator-sound-90b7db3502bdba472d8d5d914f70bb316746e072.zip |
* New upstream release.
- Fixed memory corruption issue (LP: #897218)
- crashed with SIGABRT in pa_operation_unref (LP: #908682)
- Banshee shown in sound menu after removal until reboot (LP: #771202)
- Coverity PASS_BY_VALUE - CID 10620 (LP: #937451)
- App icon and name are not aligned (LP: #939929)
Diffstat (limited to 'src/sound-service-dbus.c')
-rw-r--r-- | src/sound-service-dbus.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 5650002..07d3d6f 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -58,6 +58,7 @@ struct _SoundServiceDbusPrivate { DbusmenuMenuitem* root_menuitem; Device* device; gboolean greeter_mode; + guint registration_id; }; enum { @@ -155,18 +156,18 @@ sound_service_dbus_init (SoundServiceDbus *self) return; } /* register the service on it */ - g_dbus_connection_register_object (priv->connection, - INDICATOR_SOUND_SERVICE_DBUS_OBJECT_PATH, - interface_info, - &interface_table, - self, - NULL, - &error); - if (error != NULL) { - g_error("Unable to register the object to DBus: %s", error->message); - g_error_free(error); - return; - } + priv->registration_id = g_dbus_connection_register_object (priv->connection, + INDICATOR_SOUND_SERVICE_DBUS_OBJECT_PATH, + interface_info, + &interface_table, + self, + NULL, + &error); + if (error != NULL) { + g_error("Unable to register the object to DBus: %s", error->message); + g_error_free(error); + return; + } } DbusmenuMenuitem* @@ -239,6 +240,15 @@ show_sound_settings_dialog (DbusmenuMenuitem *mi, static void sound_service_dbus_dispose (GObject *object) { + SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (object); + + if (priv->connection && priv->registration_id) { + g_dbus_connection_unregister_object (priv->connection, priv->registration_id); + priv->registration_id = 0; + } + + g_clear_object(&priv->connection); + G_OBJECT_CLASS (sound_service_dbus_parent_class)->dispose (object); //TODO dispose of the active sink instance ! return; |