summaryrefslogtreecommitdiffstats
path: root/audio/avdtp.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-08-21 08:02:07 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-08-21 08:02:07 +0000
commit053db67fe83c502f5e509522497bed6fb721d4c7 (patch)
tree5602a8bf921f05f83743f20da220e8c64d424756 /audio/avdtp.c
parentcfa764640b52854ffa77e962996d716876fdd115 (diff)
Handle connect attempts during authorization better
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r--audio/avdtp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 649e69a4..0b56340f 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -2088,7 +2088,17 @@ struct avdtp *avdtp_get(bdaddr_t *src, bdaddr_t *dst)
gboolean avdtp_is_connected(bdaddr_t *src, bdaddr_t *dst)
{
- return find_session(src, dst) == NULL ? FALSE : TRUE;
+ struct avdtp *session;
+
+ session = find_session(src, dst);
+
+ if (!session)
+ return FALSE;
+
+ if (session->state != AVDTP_SESSION_STATE_DISCONNECTED)
+ return TRUE;
+
+ return FALSE;
}
gboolean avdtp_stream_get_transport(struct avdtp_stream *stream, int *sock,