ndef: Workaround buggy Android 4.1 BT handover implementation
authorSzymon Janc <szymon.janc@tieto.com>
Wed, 31 Oct 2012 11:22:22 +0000 (12:22 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 14 Nov 2012 10:36:11 +0000 (11:36 +0100)
commit2a42d384548d177877aa2f8060994ec5d2bc965a
tree583635bd372d25f779d382dd7c5949ed50b8ce83
parent8a14175357879aec0b8d26bc381da681e41a89c6
ndef: Workaround buggy Android 4.1 BT handover implementation

Some implementations (e.g. Android 4.1) stores the data_size in big
endian but NDEF forum spec (BT Secure Simple Pairing) requires a little
endian. At the same time, the NDEF forum NDEF spec define a payload
length as single byte (and the payload size IS the oob data size).
So we check the first byte to determine if we have a big or little
endian size.
src/ndef.c