Merge lp://staging/~cjcurran/indicator-sound/crash_sink_removal into lp://staging/indicator-sound/0.1
Proposed by
Conor Curran
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~cjcurran/indicator-sound/crash_sink_removal |
Merge into: | lp://staging/indicator-sound/0.1 |
Diff against target: |
53 lines (+12/-5) 1 file modified
src/pulse-manager.c (+12/-5) |
To merge this branch: | bzr merge lp://staging/~cjcurran/indicator-sound/crash_sink_removal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+22387@code.staging.launchpad.net |
Description of the change
Tidies up the whole area of hotswapping audio devices. Before I was leaving old invalid sink data in the sink_hash - now it is removed and destroyed.
also now the update_sink_info callback doesn't assume the info pointer is valid. (Bug #522428).
To post a comment you must log in.
review approve
On Mon, 2010-03-29 at 17:28 +0000, Conor Curran wrote: applet- developers) sound-service crashed with SIGSEGV in pa_pdispatch_run() /bugs.launchpad .net/bugs/ 522428 manager. c' set_state_ callback( pulse_context, context_ state_callback, NULL); manager_ update_ pa_state( FALSE, FALSE, FALSE, 0); connect( pulse_context, NULL, PA_CONTEXT_NOFAIL, NULL); table_get_ keys(sink_ hash); POINTER( info->index) ); POINTER( info->index) ); table_lookup( sink_hash, GINT_TO_ POINTER( info->index) ); SINK_INDEX) { "PA_SUBSCRIPTIO N_EVENT_ SINK REMOVAL event triggered - default sink has been removed !! \n updating UI to reflect the change"); dbus_update_ sink_availabili ty(dbus_ service, FALSE); sink_availabili ty(); dbus_update_ sink_availabili ty(dbus_ service, availability); "PA_SUBSCRIPTIO N_EVENT_ SINK REMOVAL - some device other than the default - no panic"); table_remove( sink_hash, GINT_TO_ POINTER( index)) ; "PA_SUBSCRIPTIO N_EVENT_ SINK_INPUT event triggered!!"); _EVENT_ TYPE_MASK) == PA_SUBSCRIPTION _EVENT_ REMOVE)
> Conor Curran has proposed merging lp:~cjcurran/indicator-sound/crash_sink_removal into lp:indicator-sound.
>
> Requested reviews:
> Indicator Applet Developers (indicator-
> Related bugs:
> #522428 indicator-
> https:/
>
>
> Tidies up the whole area of hotswapping audio devices. Before I was leaving old invalid sink data in the sink_hash - now it is removed and destroyed.
> also now the update_sink_info callback doesn't assume the info pointer is valid. (Bug #522428).
>
> differences between files attachment (review-diff.txt)
> === modified file 'src/pulse-
> --- src/pulse-manager.c 2010-03-25 10:35:30 +0000
> +++ src/pulse-manager.c 2010-03-29 17:28:23 +0000
> @@ -67,7 +67,6 @@
>
> // Establish event callback registration
> pa_context_
> - // Broadcast init state (assume we have a device - if not the signals will handle it)
> dbus_menu_
> pa_context_
> }
> @@ -359,9 +358,14 @@
> g_warning("Sink INPUT info callback failure");
> return;
> }
> -
> + gint position = -1;
> GList *keys = g_hash_
> - gint position = g_list_index(keys, GINT_TO_
> +
> + if(info == NULL)
> + return;
> +
> + position = g_list_index(keys, GINT_TO_
> +
> if(position >= 0) // => index is within the keys of the hash.
> {
> sink_info *s = g_hash_
> @@ -459,11 +463,14 @@
> {
> if(index == DEFAULT_
> g_debug(
> - sound_service_
> + gboolean availability = determine_
> + sound_service_
> }
> else{
> g_debug(
> }
> + g_debug("removing sink of index %i from our sink hash - keep the cache tidy !", index);
> + g_hash_
> }
> else
> {
> @@ -474,7 +481,7 @@
> g_debug(
> if ((t & PA_SUBSCRIPTION
> {
> - //handle the remove event - not relevant for current design
> + //handle the sink input remove event - not relevant for current design
> }
> else
> ...