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,
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;
}
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);
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);
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);
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);