You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/01/27 06:12:43 UTC
[05/10] incubator-mynewt-larva git commit: Fix bug - Long reads
caused GATT hang.
Fix bug - Long reads caused GATT hang.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/34697330
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/34697330
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/34697330
Branch: refs/heads/master
Commit: 3469733003f947057448800545a420ab0ba94f9f
Parents: 3f46e68
Author: Christopher Collins <cc...@gmail.com>
Authored: Tue Jan 26 13:12:53 2016 -0500
Committer: Christopher Collins <cc...@gmail.com>
Committed: Wed Jan 27 00:12:02 2016 -0500
----------------------------------------------------------------------
net/nimble/host/src/ble_gattc.c | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/34697330/net/nimble/host/src/ble_gattc.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gattc.c b/net/nimble/host/src/ble_gattc.c
index 864feb6..f79094f 100644
--- a/net/nimble/host/src/ble_gattc.c
+++ b/net/nimble/host/src/ble_gattc.c
@@ -2553,6 +2553,7 @@ ble_gattc_read_long_rx_read_rsp(struct ble_gattc_proc *proc,
attr.value_len = value_len;
attr.value = value;
+ /* Report partial payload to application. */
rc = ble_gattc_read_long_cb(proc, status, 0, &attr);
if (rc != 0 || status != 0) {
return 1;
@@ -2567,6 +2568,9 @@ ble_gattc_read_long_rx_read_rsp(struct ble_gattc_proc *proc,
return 1;
} else {
proc->read_long.offset += value_len;
+
+ /* Send follow-up request. */
+ ble_gattc_proc_set_pending(proc);
return 0;
}
}