diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-05 10:58:08 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-05 10:58:08 +0200 |
commit | 065258e35eee5a4bbef440d8b1135258292b6407 (patch) | |
tree | 407d4cbe2e8ca48019ca9c9bbc0fbc46be469928 | |
parent | 9a17271b1785ee511dbb70a99e069da4e25931f4 (diff) |
Cleanup SCO server socket in audio_exit()
-rw-r--r-- | audio/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
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(); |