This will be needed by next patch --- attrib/gatt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/attrib/gatt.c b/attrib/gatt.c index b8d766c..4bffd64 100644 --- a/attrib/gatt.c +++ b/attrib/gatt.c @@ -574,10 +574,16 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen, { struct discover_char *dc = user_data; struct att_data_list *list; - unsigned int i, err = ATT_ECODE_ATTR_NOT_FOUND; + unsigned int i, err = 0; uint16_t last = 0; uint8_t type; + /* We have all the characteristic now, lets send it up */ + if (status == ATT_ECODE_ATTR_NOT_FOUND) { + err = dc->characteristics ? 0 : status; + goto done; + } + if (status) { err = status; goto done; @@ -647,7 +653,6 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen, } done: - err = (dc->characteristics ? 0 : err); dc->cb(err, dc->characteristics, dc->user_data); } -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html