From 9f5926bf5a62a60ebe2c148e9ea57bdcf98d0761 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 14 Feb 2019 15:47:14 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- Gopkg.lock | 4 ++-- vendor/github.com/bettercap/gatt/peripheral_linux.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 2505cbc3..d5b2bdda 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -11,7 +11,7 @@ [[projects]] branch = "master" - digest = "1:a05b82f85695079c51be7c18bde0626065c8c4b785d28c7c6a4709e5caf2a150" + digest = "1:c309b41787813f80ec393023471014b0be16346bba6e16bf5fa01ce1d310a4ea" name = "github.com/bettercap/gatt" packages = [ ".", @@ -24,7 +24,7 @@ "xpc", ] pruneopts = "UT" - revision = "06302e1b3ef319b444942decc2ed38fc950c74ed" + revision = "1353e80bee488dc02d1f7e42759c1352492bf18b" [[projects]] digest = "1:b95738a1e6ace058b5b8544303c0871fc01d224ef0d672f778f696265d0f2917" 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):