diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2012-03-16 13:59:34 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2012-03-16 13:59:34 -0400 |
commit | cbd5d4933fa4989c7f9feedcd73b2dd849fbdebf (patch) | |
tree | f2d79156e55abefebad964e739eb810174635dd1 /src/pulseaudio-mgr.c | |
parent | 79dc1a84cb86027b9f031db253a333de4f1ea23f (diff) | |
parent | 8e8a06aa8829abe57acf68e252577286bc15ef74 (diff) | |
download | ayatana-indicator-sound-cbd5d4933fa4989c7f9feedcd73b2dd849fbdebf.tar.gz ayatana-indicator-sound-cbd5d4933fa4989c7f9feedcd73b2dd849fbdebf.tar.bz2 ayatana-indicator-sound-cbd5d4933fa4989c7f9feedcd73b2dd849fbdebf.zip |
* New upstream release.
- indicator-sound "Choose Playlist" menu item does nothing when using
Rhythmbox (LP: #952550)
- crashed with SIGSEGV in g_strdup() (LP: #946607)
- crashed with SIGABRT in pa_operation_unref() (LP: #944148)
- crashed with signal 5 in g_type_create_instance() (LP: #921755)
- slider on unmute resets volume (LP: #921065)
- play controls not exposed in HUD (LP: #949032)
- unity-panel-service at 100% cpu when opened /w rb without album
cover (LP: #806848)
Diffstat (limited to 'src/pulseaudio-mgr.c')
-rw-r--r-- | src/pulseaudio-mgr.c | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c index fee504e..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); } @@ -401,27 +401,39 @@ pm_context_state_callback (pa_context *c, void *userdata) case PA_CONTEXT_READY: connection_attempts = 0; g_debug("PA_CONTEXT_READY"); + if (reconnect_idle_id != 0){ g_source_remove (reconnect_idle_id); reconnect_idle_id = 0; } - pa_operation *o; pa_context_set_subscribe_callback(c, pm_subscribed_events_callback, userdata); - - if (!(o = pa_context_subscribe (c, (pa_subscription_mask_t) - (PA_SUBSCRIPTION_MASK_SINK| - PA_SUBSCRIPTION_MASK_SOURCE| - PA_SUBSCRIPTION_MASK_SINK_INPUT| - PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT| - PA_SUBSCRIPTION_MASK_SERVER), NULL, NULL))) { - g_warning("pa_context_subscribe() failed"); + pa_operation *o = NULL; + + o = pa_context_subscribe (c, (pa_subscription_mask_t) + (PA_SUBSCRIPTION_MASK_SINK| + PA_SUBSCRIPTION_MASK_SOURCE| + PA_SUBSCRIPTION_MASK_SINK_INPUT| + PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT| + PA_SUBSCRIPTION_MASK_SERVER), + NULL, + NULL); + + if (!o){ + g_critical("pa_context_subscribe() failed - ?"); + return; } - if (!(o = pa_context_get_server_info (c, pm_server_info_callback, userdata))) { - g_warning("Initial - pa_context_get_server_info() failed"); + pa_operation_unref(o); + + o = pa_context_get_server_info (c, pm_server_info_callback, userdata); + + if (!o){ + g_warning("pa_context_get_server_info() failed - ?"); + return; } + pa_operation_unref(o); break; @@ -621,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 |