aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pulseaudio-mgr.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c
index b8d754f..f205723 100644
--- a/src/pulseaudio-mgr.c
+++ b/src/pulseaudio-mgr.c
@@ -218,7 +218,7 @@ pm_update_mute (gboolean update)
if (!operation){
g_warning ("pm_update_mute operation failed for some reason");
return;
- }
+ }
pa_operation_unref (operation);
}
@@ -633,17 +633,23 @@ pm_toggle_mute_for_every_sink_callback (pa_context *c,
if (eol > 0) {
return;
}
- else {
- if (sink == NULL) {
- g_warning ("toggle_mute cb - sink parameter is null - why ?");
- return;
- }
- pa_operation_unref (pa_context_set_sink_mute_by_index (c,
- sink->index,
- GPOINTER_TO_INT(userdata),
- NULL,
- NULL));
+
+ if (sink == NULL) {
+ g_warning ("toggle_mute cb - sink parameter is null - why ?");
+ return;
}
+
+ pa_operation *operation = NULL;
+ operation = pa_context_set_sink_mute_by_index (c,
+ sink->index,
+ GPOINTER_TO_INT(userdata),
+ NULL,
+ NULL);
+ if (!operation){
+ g_warning ("pm_update_mic_mute operation failed for some reason");
+ return;
+ }
+ pa_operation_unref (operation);
}
// Source info related callbacks