Thread (21 messages) 21 messages, 4 authors, 2011-08-24

Re: [PATCH v2 7/9] Fix invalid state at SCO disconnect in gateway

flat view

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2011-08-24 10:57:43

Hi Frédéric,

2011/8/22 Frédéric Dalleau [off-list ref]:
quoted hunk ↗ jump to hunk
If SCO disconnects after RFCOMM, do not change state to connected.
---
 audio/gateway.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/audio/gateway.c b/audio/gateway.c
index c3c4019..d41bbc3 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -191,7 +191,9 @@ static gboolean sco_io_cb(GIOChannel *chan, GIOCondition cond,
       g_io_channel_shutdown(gw->sco, TRUE, NULL);
       g_io_channel_unref(gw->sco);
       gw->sco = NULL;
-       change_state(dev, GATEWAY_STATE_CONNECTED);
+
+       if (gw->rfcomm)
+               change_state(dev, GATEWAY_STATE_CONNECTED);

       return FALSE;
 }
--
1.7.1
This looks like a workaround, the watch should not be active anymore
if rfcomm is disconnected so there is a bug somewhere else.

-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help