Diff between ec57950ff57ae879bc0a262c2a94a14d3105b91d and 221fd83c2c9e9d773fcc9d01d04ba9a745fb8754
Changed Files
| File | Additions | Deletions | Status |
| attrib/gatt.c | +2 | -1 | modified |
Full Patch
diff --git a/attrib/gatt.c b/attrib/gatt.c
index 9ab283f..aea59ec 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -302,7 +302,6 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen,
}
att_data_list_free(list);
- err = 0;
if (last != 0 && (last + 1 < dc->end)) {
buf = g_attrib_get_buffer(dc->attrib, &buflen);
@@ -321,6 +320,8 @@ static void char_discovered_cb(guint8 status, const guint8 *ipdu, guint16 iplen,
return;
}
+ err = (dc->characteristics ? 0 : ATT_ECODE_ATTR_NOT_FOUND);
+
done:
dc->cb(dc->characteristics, err, dc->user_data);
discover_char_free(dc);