From 50774762096a25b9ff4dc22d78bc26443d00e3a7 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 14 Feb 2019 14:43:14 +0100 Subject: [PATCH] fix: fixed a bug which caused characteristics enumeration to fail in some cases --- vendor/github.com/bettercap/gatt/peripheral_linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vendor/github.com/bettercap/gatt/peripheral_linux.go b/vendor/github.com/bettercap/gatt/peripheral_linux.go index 6b1213a6..f3fc530d 100644 --- a/vendor/github.com/bettercap/gatt/peripheral_linux.go +++ b/vendor/github.com/bettercap/gatt/peripheral_linux.go @@ -123,12 +123,11 @@ func (p *peripheral) DiscoverCharacteristics(cs []UUID, s *Service) ([]*Characte binary.LittleEndian.PutUint16(b[5:7], 0x2803) b = p.sendReq(op, b) - done, err = finish(op, start, b) - if done { + if done = b[0] != byte(attOpReadByTypeRsp); done { break } - b = b[1:] + b = b[1:] l, b := int(b[0]), b[1:] switch { case l == 7 && (len(b)%7 == 0):