From e3550c53b92297fdaa84105c3fa9fd5b69d98e83 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 25 Mar 2011 11:12:52 +0000 Subject: defensive touches to update state method --- src/sound-service-dbus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 1b9d29e..ea96e6a 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -237,6 +237,12 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self, GError * error = NULL; + if (priv->connection == NULL || + g_dbus_connection_is_closed (priv->connection) == TRUE){ + g_warning ("sound_service_dbus_update_sound_state - connection no good !!"); + return; + } + g_debug ("emitting state signal with value %i", (int)new_state); g_dbus_connection_emit_signal( priv->connection, NULL, -- cgit v1.2.3 From 2053d2450e61d17f27ab47f67624b14dd4829589 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 25 Mar 2011 11:21:28 +0000 Subject: defensive touches to update state method --- src/sound-service-dbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index ea96e6a..2f7e32c 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -252,9 +252,8 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self, v_output, &error ); if (error != NULL) { - g_error("Unable to emit signal 'sinkinputwhilemuted' because : %s", error->message); + g_error("Unable to emit signal because : %s", error->message); g_error_free(error); - return; } } -- cgit v1.2.3 From d6d917b02d2eff0855446d35da278a6f701a05c5 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 25 Mar 2011 11:34:52 +0000 Subject: g_critical not a g_error --- src/sound-service-dbus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 2f7e32c..27de893 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -239,7 +239,7 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self, if (priv->connection == NULL || g_dbus_connection_is_closed (priv->connection) == TRUE){ - g_warning ("sound_service_dbus_update_sound_state - connection no good !!"); + g_critical ("sound_service_dbus_update_sound_state - connection no good !!"); return; } @@ -252,7 +252,7 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self, v_output, &error ); if (error != NULL) { - g_error("Unable to emit signal because : %s", error->message); + g_critical ("Unable to emit signal because : %s", error->message); g_error_free(error); } } -- cgit v1.2.3 From e1da450841a9a01883422dc1ff249ef3863eaee8 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 25 Mar 2011 11:55:49 +0000 Subject: more visibility on possible errors --- src/sound-service-dbus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c index 27de893..dc1fd94 100644 --- a/src/sound-service-dbus.c +++ b/src/sound-service-dbus.c @@ -239,7 +239,8 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self, if (priv->connection == NULL || g_dbus_connection_is_closed (priv->connection) == TRUE){ - g_critical ("sound_service_dbus_update_sound_state - connection no good !!"); + g_critical ("sound_service_dbus_update_sound_state - connection is %s !!", + priv->connection == NULL? "NULL" : "closed"); return; } -- cgit v1.2.3