summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-10-01 18:22:32 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-10-01 18:22:32 -0300
commite303ffce67951a29d822c8c819e74e2c70c297d7 (patch)
tree347137de79ad4ecab8dc0c4ca817f1c1eb87ae9c
parent2790c55aea898f49e03574eb933c3895b05a236a (diff)
Fix AVDTP_STATE_OPEN to happen only after connected and thus prevent emitting Connected signal when not connected.
-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;
}