From 065258e35eee5a4bbef440d8b1135258292b6407 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 5 Oct 2008 10:58:08 +0200 Subject: Cleanup SCO server socket in audio_exit() --- audio/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/audio/main.c b/audio/main.c index 3f335f25..c297f92a 100644 --- a/audio/main.c +++ b/audio/main.c @@ -45,6 +45,8 @@ #include "headset.h" #include "manager.h" +static GIOChannel *sco_server = NULL; + static GKeyFile *load_config_file(const char *file) { GError *err = NULL; @@ -110,7 +112,6 @@ static DBusConnection *connection; static int audio_init(void) { GKeyFile *config; - GIOChannel *sco_server; connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); if (connection == NULL) @@ -139,6 +140,12 @@ static int audio_init(void) static void audio_exit(void) { + if (sco_server) { + g_io_channel_close(sco_server); + g_io_channel_unref(sco_server); + sco_server = NULL; + } + audio_manager_exit(); unix_exit(); -- cgit