From 0385c813d7ed6aca1ae6f3f60acdbb52263de5b7 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 1 Oct 2010 19:46:36 +0100 Subject: 100% core usage bug fixed --- src/pulse-manager.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/pulse-manager.c') diff --git a/src/pulse-manager.c b/src/pulse-manager.c index f93368e..b8e2ef7 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -534,7 +534,6 @@ static void context_state_callback(pa_context *c, void *userdata) case PA_CONTEXT_FAILED: g_warning("FAILED to retrieve context - Is PulseAudio Daemon running ?"); pa_server_available = FALSE; - reconnect_to_pulse(); break; case PA_CONTEXT_TERMINATED: /* g_debug("context terminated");*/ -- cgit v1.2.3 From 352919657eab5a4e1fc63e6191cc088b148ab376 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 5 Oct 2010 17:15:34 +0100 Subject: removed unused pulse method --- src/pulse-manager.c | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/pulse-manager.c') diff --git a/src/pulse-manager.c b/src/pulse-manager.c index b8e2ef7..8779525 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -43,7 +43,6 @@ static void pulse_server_info_callback(pa_context *c, const pa_server_info *info static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, void *userdata); static void destroy_sink_info(void *value); static gboolean determine_sink_availability(); -static void reconnect_to_pulse(); static gboolean has_volume_changed(const pa_sink_info* new_sink, sink_info* cached_sink); static pa_cvolume construct_mono_volume(const pa_cvolume* vol); @@ -99,35 +98,6 @@ void close_pulse_activites() /* g_debug("I just closed communication with Pulse");*/ } -/** -reconnect_to_pulse() -In the event of Pulseaudio flapping in the wind handle gracefully without -memory leaks ! -*/ -static void reconnect_to_pulse() -{ - // reset - if (pulse_context != NULL) { - g_debug("freeing the pulse context"); - pa_context_unref(pulse_context); - pulse_context = NULL; - } - - if (sink_hash != NULL) { - g_hash_table_destroy(sink_hash); - sink_hash = NULL; - } - - // reconnect - pulse_context = pa_context_new(pa_glib_mainloop_get_api(pa_main_loop), "ayatana.indicator.sound"); - g_assert(pulse_context); - sink_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_sink_info); - // Establish event callback registration - pa_context_set_state_callback(pulse_context, context_state_callback, NULL); - dbus_menu_manager_update_pa_state(FALSE, FALSE, FALSE, 0); - pa_context_connect(pulse_context, NULL, PA_CONTEXT_NOFAIL, NULL); -} - /** destroy_sink_info() item destructor method for the sink_info hash -- cgit v1.2.3