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 2015/11/26 02:30:18 UTC

incubator-mynewt-larva git commit: Clear ack callback when HCI tx fails.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master 2cf8182d0 -> 48d5b34fc


Clear ack callback when HCI tx fails.


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/48d5b34f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/48d5b34f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/48d5b34f

Branch: refs/heads/master
Commit: 48d5b34fceaf591fb69b1d55d6c4349618331aa7
Parents: 2cf8182
Author: Christopher Collins <cc...@gmail.com>
Authored: Wed Nov 25 17:29:53 2015 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Wed Nov 25 17:29:53 2015 -0800

----------------------------------------------------------------------
 net/nimble/host/src/host_hci_cmd.c | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/48d5b34f/net/nimble/host/src/host_hci_cmd.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/host_hci_cmd.c b/net/nimble/host/src/host_hci_cmd.c
index b9f6567..5d28f62 100644
--- a/net/nimble/host/src/host_hci_cmd.c
+++ b/net/nimble/host/src/host_hci_cmd.c
@@ -61,6 +61,9 @@ host_hci_le_cmd_send(uint16_t ocf, uint8_t len, void *cmddata)
         rc = host_hci_cmd_send(cmd);
         if (rc == 0) {
             host_hci_outstanding_opcode = opcode;
+        } else {
+            /* Clear the ack callback on send failure. */
+            ble_hs_ack_set_callback(NULL, NULL);
         }
     }