From 6439c43376df98aab3cfb9cdcde0c3c0bfd2a367 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 15 Feb 2007 23:54:47 +0000 Subject: Fix io watch flags for sco channel --- audio/headset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'audio/headset.c') diff --git a/audio/headset.c b/audio/headset.c index 1112f5b4..3714989b 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -572,7 +572,10 @@ static gboolean sco_connect_cb(GIOChannel *chan, GIOCondition cond, hs->sco = chan; hs->pending_connect->io = NULL; - flags = hs->audio_output ? G_IO_IN : 0; + flags = G_IO_ERR | G_IO_HUP | G_IO_NVAL; + if (hs->audio_output) + flags |= G_IO_IN; + g_io_add_watch(hs->sco, flags, sco_input_to_audio_output_cb, hs); if (hs->pending_connect->msg) { -- cgit