From d8c009db669b4f5459c049425830274e559208c5 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 19 Mar 2014 19:06:18 +0200 Subject: [PATCH] core: Don't try to continue ATT discovery after a failure --- src/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/device.c b/src/device.c index 4f29ba9cd..60820b7e0 100644 --- a/src/device.c +++ b/src/device.c @@ -3359,10 +3359,16 @@ static void find_included_cb(uint8_t status, GSList *includes, void *user_data) struct gatt_primary *prim; GSList *l; - if (device->attrib == NULL) { + DBG("status %u", status); + + if (device->attrib == NULL || status) { struct browse_req *req = device->browse; - error("Disconnected while doing included discovery"); + if (status) + error("Find included services failed: %s (%d)", + att_ecode2str(status), status); + else + error("Disconnected while doing included discovery"); if (!req) goto complete; @@ -3379,12 +3385,6 @@ static void find_included_cb(uint8_t status, GSList *includes, void *user_data) goto complete; } - if (status != 0) { - error("Find included services failed: %s (%d)", - att_ecode2str(status), status); - goto next; - } - if (includes == NULL) goto next; -- 2.47.3