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

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

flat view
STALE5530d SUPERSEDED

From: Frédéric Dalleau <hidden>
Date: 2011-08-22 15:30:45
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v2 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help