summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/avdtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 5a8cd58b..c92d8932 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -656,6 +656,8 @@ static void handle_transport_connect(struct avdtp *session, int sock,
if (!stream->open_acp && sep->cfm && sep->cfm->open)
sep->cfm->open(session, sep, stream, NULL, sep->user_data);
+ avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN);
+
channel = g_io_channel_unix_new(stream->sock);
stream->io = g_io_add_watch(channel, G_IO_ERR | G_IO_HUP | G_IO_NVAL,
@@ -1886,8 +1888,6 @@ static gboolean avdtp_open_resp(struct avdtp *session, struct avdtp_stream *stre
session->pending_open = stream;
- avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN);
-
return TRUE;
}