diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-21 10:09:12 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-21 10:09:12 -0500 |
commit | 24aee7a6b0fa5b2ab259e91dc8162a345a746c93 (patch) | |
tree | a5a8670e373285441ff49572ac51773ba1bed57d | |
parent | 9b911a8d59c74324b166cc334daa2c94905a3031 (diff) | |
download | ofono-24aee7a6b0fa5b2ab259e91dc8162a345a746c93.tar.bz2 |
stkutil: Refactor attribute information
Only Bluetooth & IRDA are really defined by the specification
-rw-r--r-- | src/stkutil.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/stkutil.c b/src/stkutil.c index 6b3415e1..b88e2dd1 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -1367,13 +1367,16 @@ static gboolean parse_dataobj_attribute_info( const unsigned char *data; unsigned int len = comprehension_tlv_iter_get_length(iter); - if (len < 1) + if (len < 2) return FALSE; - if (len == 1) - return TRUE; - data = comprehension_tlv_iter_get_data(iter); + + /* According to TS 102.223, everything except BT & IRDA is RFU */ + if (data[0] != STK_TECHNOLOGY_BLUETOOTH && + data[0] != STK_TECHNOLOGY_IRDA) + return FALSE; + ai->tech_id = data[0]; ai->len = len - 1; |