diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-13 13:04:20 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-13 13:04:20 -0700 |
commit | feb323b78756b80a3fa9cd540ba195388b0b6e18 (patch) | |
tree | d36fc2dacb678829a946277335a1e18b878ce2ee | |
parent | 09a7e0c4878283f8aff26f33ca89f85e36048bdb (diff) | |
download | bluez-feb323b78756b80a3fa9cd540ba195388b0b6e18.tar.gz |
auto import from //branches/cupcake_rel/...@138607
-rw-r--r-- | utils/audio/avdtp.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/utils/audio/avdtp.c b/utils/audio/avdtp.c index 02e26951..3a8060f6 100644 --- a/utils/audio/avdtp.c +++ b/utils/audio/avdtp.c @@ -2086,7 +2086,10 @@ static gboolean avdtp_set_configuration_resp(struct avdtp *session, struct avdtp_single_header *resp, int size) { - struct avdtp_local_sep *sep = stream->lsep; + struct avdtp_local_sep *sep; + if (!stream) + return TRUE; + sep = stream->lsep; if (sep->cfm && sep->cfm->set_configuration) sep->cfm->set_configuration(session, sep, stream, NULL, @@ -2116,7 +2119,10 @@ static gboolean avdtp_open_resp(struct avdtp *session, struct avdtp_stream *stre session->pending_open = stream; +/* Don't set state to AVDTP_STATE_OPEN yet. + Instead, wait until the pending_open completes in handle_transport_connect() avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN); +*/ return TRUE; } @@ -2125,7 +2131,10 @@ static gboolean avdtp_start_resp(struct avdtp *session, struct avdtp_stream *stream, struct seid_rej *resp, int size) { - struct avdtp_local_sep *sep = stream->lsep; + struct avdtp_local_sep *sep; + if (!stream) + return TRUE; + sep = stream->lsep; if (sep->cfm && sep->cfm->start) sep->cfm->start(session, sep, stream, NULL, sep->user_data); @@ -2139,7 +2148,10 @@ static gboolean avdtp_close_resp(struct avdtp *session, struct avdtp_stream *stream, struct seid_rej *resp, int size) { - struct avdtp_local_sep *sep = stream->lsep; + struct avdtp_local_sep *sep; + if (!stream) + return TRUE; + sep = stream->lsep; avdtp_sep_set_state(session, sep, AVDTP_STATE_CLOSING); @@ -2153,7 +2165,10 @@ static gboolean avdtp_suspend_resp(struct avdtp *session, struct avdtp_stream *stream, void *data, int size) { - struct avdtp_local_sep *sep = stream->lsep; + struct avdtp_local_sep *sep; + if (!stream) + return TRUE; + sep = stream->lsep; avdtp_sep_set_state(session, sep, AVDTP_STATE_OPEN); @@ -2172,7 +2187,10 @@ static gboolean avdtp_abort_resp(struct avdtp *session, struct avdtp_stream *stream, struct seid_rej *resp, int size) { - struct avdtp_local_sep *sep = stream->lsep; + struct avdtp_local_sep *sep; + if (!stream) + return TRUE; + sep = stream->lsep; if (sep->cfm && sep->cfm->abort) sep->cfm->abort(session, sep, stream, NULL, sep->user_data); |