mirror of
https://github.com/google/bumble.git
synced 2026-05-08 03:58:01 +00:00
Change in sdp.py file while testing hid profile,
TEXT_STRING: lambda x: DataElement(DataElement.TEXT_STRING, x.decode('utf8')) changed to
TEXT_STRING: lambda x: DataElement(DataElement.TEXT_STRING, x)
as we were facing error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 4: invalid start byte" while fetching sdp records.
This commit is contained in:
@@ -167,7 +167,7 @@ class DataElement:
|
|||||||
UUID: lambda x: DataElement(
|
UUID: lambda x: DataElement(
|
||||||
DataElement.UUID, core.UUID.from_bytes(bytes(reversed(x)))
|
DataElement.UUID, core.UUID.from_bytes(bytes(reversed(x)))
|
||||||
),
|
),
|
||||||
TEXT_STRING: lambda x: DataElement(DataElement.TEXT_STRING, x.decode('utf8')),
|
TEXT_STRING: lambda x: DataElement(DataElement.TEXT_STRING, x),
|
||||||
BOOLEAN: lambda x: DataElement(DataElement.BOOLEAN, x[0] == 1),
|
BOOLEAN: lambda x: DataElement(DataElement.BOOLEAN, x[0] == 1),
|
||||||
SEQUENCE: lambda x: DataElement(
|
SEQUENCE: lambda x: DataElement(
|
||||||
DataElement.SEQUENCE, DataElement.list_from_bytes(x)
|
DataElement.SEQUENCE, DataElement.list_from_bytes(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user