diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-15 09:17:03 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-15 09:17:03 +0000 |
commit | 49d7d366bbbe13d0ebdb79da908aee5ca5429dcd (patch) | |
tree | d9d4a71e1cf11c277587b324e8a0629b9848d3d0 | |
parent | 1c28d6bfc5d9f01956dfbbca1c04df10cf68591f (diff) |
Switch to OPEN state when receiving Open accept response
-rw-r--r-- | audio/avdtp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index a13abd23..9da8730f 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -1608,11 +1608,15 @@ static gboolean avdtp_open_resp(struct avdtp *session, struct avdtp_stream *stre { struct avdtp_local_sep *sep = stream->lsep; - if (l2cap_connect(session) < 0) + if (l2cap_connect(session) < 0) { avdtp_sep_set_state(session, sep, AVDTP_STATE_IDLE); + return FALSE; + } session->pending_open = stream; + avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN); + return TRUE; } |