Merge lp:~cjcurran/indicator-sound/global-mute-defensive into lp:indicator-sound/fifth

Proposed by Conor Curran
Status: Merged
Approved by: Charles Kerr
Approved revision: 307
Merge reported by: Charles Kerr
Merged at revision: not available
Proposed branch: lp:~cjcurran/indicator-sound/global-mute-defensive
Merge into: lp:indicator-sound/fifth
Diff against target: 47 lines (+18/-12)
1 file modified
src/pulseaudio-mgr.c (+18/-12)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/global-mute-defensive
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Review via email: mp+97502@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

the if-else cleanup is a nice bonus, too...

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

merged in r308

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pulseaudio-mgr.c'
2--- src/pulseaudio-mgr.c 2012-03-01 16:00:38 +0000
3+++ src/pulseaudio-mgr.c 2012-03-14 19:40:32 +0000
4@@ -218,7 +218,7 @@
5 if (!operation){
6 g_warning ("pm_update_mute operation failed for some reason");
7 return;
8- }
9+ }
10 pa_operation_unref (operation);
11 }
12
13@@ -621,17 +621,23 @@
14 if (eol > 0) {
15 return;
16 }
17- else {
18- if (sink == NULL) {
19- g_warning ("toggle_mute cb - sink parameter is null - why ?");
20- return;
21- }
22- pa_operation_unref (pa_context_set_sink_mute_by_index (c,
23- sink->index,
24- GPOINTER_TO_INT(userdata),
25- NULL,
26- NULL));
27- }
28+
29+ if (sink == NULL) {
30+ g_warning ("toggle_mute cb - sink parameter is null - why ?");
31+ return;
32+ }
33+
34+ pa_operation *operation = NULL;
35+ operation = pa_context_set_sink_mute_by_index (c,
36+ sink->index,
37+ GPOINTER_TO_INT(userdata),
38+ NULL,
39+ NULL);
40+ if (!operation){
41+ g_warning ("pm_update_mic_mute operation failed for some reason");
42+ return;
43+ }
44+ pa_operation_unref (operation);
45 }
46
47 // Source info related callbacks

Subscribers

People subscribed via source and target branches