summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-10-05 11:00:03 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-10-05 11:00:03 +0200
commit016eb60f4560b9278c2bf096fc0fc8d62c6035f4 (patch)
tree380af175354ad2dfe52765d0b6bfc3d311de4905
parent3cb84c32b8a49770b217641c73fdfe1fd65959f2 (diff)
parent065258e35eee5a4bbef440d8b1135258292b6407 (diff)
Merge branch 'master' of ssh://master.kernel.org/pub/scm/bluetooth/bluez
-rw-r--r--audio/main.c9
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();