mirror of git://git.sysmocom.de/ofono
stkutil: refactor device filter
Only Bluetooth & IRDA are really defined by the specification
This commit is contained in:
parent
515eef4db0
commit
432effa755
|
@ -1307,13 +1307,16 @@ static gboolean parse_dataobj_device_filter(struct comprehension_tlv_iter *iter,
|
|||
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;
|
||||
|
||||
df->tech_id = data[0];
|
||||
df->len = len - 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue