static struct a2dp_remote_sep *find_remote_sep(struct a2dp_channel *chan,
struct a2dp_sep *sep)
{
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (!chan) {
+ DBG("chan is NULL");
+ return NULL;
+ }
+#endif
+
struct avdtp_remote_sep *rsep;
rsep = avdtp_find_remote_sep(chan->session, sep->lsep);
static struct a2dp_remote_sep *get_remote_sep(struct a2dp_channel *chan,
struct avdtp_stream *stream)
{
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (!chan) {
+ DBG("chan is NULL");
+ return NULL;
+ }
+#endif
+
struct avdtp_remote_sep *rsep;
rsep = avdtp_stream_get_remote_sep(stream);
static void channel_free(void *data)
{
struct a2dp_channel *chan = data;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ struct a2dp_setup *setup = NULL;
+#endif
if (chan->auth_id > 0)
btd_cancel_authorization(chan->auth_id);
queue_destroy(chan->seps, remove_remote_sep);
free(chan->last_used);
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (chan->session)
+ setup = find_setup_by_session(chan->session);
+
+ if (setup && setup->chan == chan)
+ setup->chan = NULL;
+#endif
+
g_free(chan);
}
}
setup->rsep = find_remote_sep(setup->chan, setup->sep);
+
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (!setup->rsep) {
+ error("unable to find remote SEP");
+ goto done;
+ }
+#endif
+
service = avdtp_get_codec(setup->rsep->sep);
codec = (struct avdtp_media_codec_capability *) service->data;