summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-20 07:38:28 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-20 07:38:28 -0800
commitb80c26081133bee33f876a665e1326d5d320dd16 (patch)
treeecc353dc9f975a9b368cd184993e66c2df9d5986
parentc8835fca4fed20a71b84afd99ee2d318cc1279bf (diff)
downloadbluez-b80c26081133bee33f876a665e1326d5d320dd16.tar.gz
auto import from //branches/cupcake/...@132569
-rw-r--r--utils/audio/avdtp.c3
-rw-r--r--utils/audio/sink.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/utils/audio/avdtp.c b/utils/audio/avdtp.c
index 8bdfdb4b..775c37b4 100644
--- a/utils/audio/avdtp.c
+++ b/utils/audio/avdtp.c
@@ -651,6 +651,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,
@@ -1140,7 +1142,6 @@ static gboolean avdtp_open_cmd(struct avdtp *session, struct seid_req *req,
stream->open_acp = TRUE;
session->pending_open = stream;
- avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN);
stream->timer = g_timeout_add(REQ_TIMEOUT, stream_open_timeout,
stream);
diff --git a/utils/audio/sink.c b/utils/audio/sink.c
index 38ef2e61..dee0272b 100644
--- a/utils/audio/sink.c
+++ b/utils/audio/sink.c
@@ -379,7 +379,8 @@ static void discovery_complete(struct avdtp *session, GSList *seps, struct avdtp
if (id == 0)
goto failed;
- pending->id = id;
+ if (pending)
+ pending->id = id;
return;
failed: