Merge lp:~cjcurran/indicator-sound/sigabrt into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran on 2011-03-25
Status: Merged
Merged at revision: 234
Proposed branch: lp:~cjcurran/indicator-sound/sigabrt
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 27 lines (+8/-2)
1 file modified
src/sound-service-dbus.c (+8/-2)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/sigabrt
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) 2011-03-25 Approve on 2011-03-25
Review via email: mp+54848@code.launchpad.net

Description of the change

Fixes the bug attached.

To post a comment you must log in.

8 + if (priv->connection == NULL ||
9 + g_dbus_connection_is_closed (priv->connection) == TRUE){
10 + g_critical ("sound_service_dbus_update_sound_state - connection no good !!");
11 + return;
12 + }
13 +

If this occurs I think it's crucial for debugging to know which one of the two conditions happened?

Maybe like this instead:

+ if (priv->connection == NULL || g_dbus_connection_is_closed (priv->connection)) {
+ g_critical ("sound_service_dbus_update_sound_state - connection is %s !!",
+ connection == NULL? "NULL" : "closed");
+ return;
+ }

But no biggie. Approved.

review: Approve
Conor Curran (cjcurran) wrote :

Makes sense, applying to the merge.

lp:~cjcurran/indicator-sound/sigabrt updated on 2011-03-25
237. By Conor Curran on 2011-03-25

more visibility on possible errors

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sound-service-dbus.c'
2--- src/sound-service-dbus.c 2011-03-23 14:41:10 +0000
3+++ src/sound-service-dbus.c 2011-03-25 11:56:54 +0000
4@@ -237,6 +237,13 @@
5
6 GError * error = NULL;
7
8+ if (priv->connection == NULL ||
9+ g_dbus_connection_is_closed (priv->connection) == TRUE){
10+ g_critical ("sound_service_dbus_update_sound_state - connection is %s !!",
11+ priv->connection == NULL? "NULL" : "closed");
12+ return;
13+ }
14+
15 g_debug ("emitting state signal with value %i", (int)new_state);
16 g_dbus_connection_emit_signal( priv->connection,
17 NULL,
18@@ -246,9 +253,8 @@
19 v_output,
20 &error );
21 if (error != NULL) {
22- g_error("Unable to emit signal 'sinkinputwhilemuted' because : %s", error->message);
23+ g_critical ("Unable to emit signal because : %s", error->message);
24 g_error_free(error);
25- return;
26 }
27 }
28

Subscribers

People subscribed via source and target branches