summaryrefslogtreecommitdiff
path: root/android/avdtp.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2018-12-23 11:40:17 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-12-28 15:09:41 -0300
commitf29a5de80bd49e861992f97e4479440f01e4cc7a (patch)
tree45279fdebbaac04c0f084489890dea21026bd5ab /android/avdtp.c
parent86c7f72b0d150386f06ca07279dce40591d29921 (diff)
downloadbluez-f29a5de80bd49e861992f97e4479440f01e4cc7a.tar.gz
a2dp-codecs: Define a2dp_vendor_codec_t struct in endian neutral way
And define new macros A2DP_GET_VENDOR_ID(), A2DP_GET_CODEC_ID() and A2DP_SET_VENDOR_ID_CODEC_ID() for easily filling a2dp_vendor_codec_t struct.
Diffstat (limited to 'android/avdtp.c')
-rw-r--r--android/avdtp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/android/avdtp.c b/android/avdtp.c
index 34caf3db5..7fb8cb731 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -1103,10 +1103,12 @@ struct avdtp_remote_sep *avdtp_find_remote_sep(struct avdtp *session,
a2dp_vendor_codec_t *vndcodec =
(void *) codec_data->data;
- if (btohl(vndcodec->vendor_id) != lsep->vndcodec_vendor)
+ if (A2DP_GET_VENDOR_ID(*vndcodec) !=
+ lsep->vndcodec_vendor)
continue;
- if (btohs(vndcodec->codec_id) != lsep->vndcodec_codec)
+ if (A2DP_GET_CODEC_ID(*vndcodec) !=
+ lsep->vndcodec_codec)
continue;
}