OSDN Git Service

eir: Fix incorrect eir_length() parsing
authorSyam Sidhardhan <s.syam@samsung.com>
Mon, 16 Apr 2012 13:01:37 +0000 (18:31 +0530)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Apr 2012 19:55:42 +0000 (22:55 +0300)
commit3424dc81ef8c5c83a78cf3e0cd6c38f075f44fce
treede71b4f8a0c391017b51750c20724f824eeebec2
parent4b6c1b7311f4964a956ef809ffb94262c69613c4
eir: Fix incorrect eir_length() parsing

Issue:
The COD value displayed via dbus during inquiry is wrong.
This is because of the incorrect return length of the eir_length(),
which leads to appending the COD at wrong location.

Analysis:
After appending the COD at the end of the eir data, we can see
there are some '00' present in the eir field length in the eir file.
XX:XX:XX:XX:XX:XX 07095359414D5043020A040B0312111F110C110E110311
0000000000000000000000040D000142

Fix:
Corrected the length calculation in eir_length(), which is determining,
which position the COD should append
src/eir.c