diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2015-02-26 10:39:33 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-27 16:33:56 +0100 |
commit | 2746cd4e590ebfacb0120bc7d590deb4ec02003b (patch) | |
tree | 4b300f552ee3ddd055819eace948a7263f475e4e /android/gatt.c | |
parent | 1998daa85d9aeaf4ae276e70f9a59c7ca4de003f (diff) | |
download | bluez-2746cd4e590ebfacb0120bc7d590deb4ec02003b.tar.gz |
android/gatt: Check status on get characteristic callback
Diffstat (limited to 'android/gatt.c')
-rw-r--r-- | android/gatt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/gatt.c b/android/gatt.c index 53b19833d..0296788cf 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -2725,12 +2725,20 @@ static void discover_char_cb(uint8_t status, GSList *characteristics, struct discover_char_data *data = user_data; struct service *srvc = data->service; + if (status) { + error("gatt: Failed to get characteristics: %s", + att_ecode2str(status)); + convert_send_client_char_notify(NULL, data->conn_id, srvc); + goto done; + } + if (queue_isempty(srvc->chars)) cache_all_srvc_chars(srvc, characteristics); convert_send_client_char_notify(queue_peek_head(srvc->chars), data->conn_id, srvc); +done: free(data); } |