You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2017/04/10 11:47:32 UTC

[40/50] incubator-mynewt-core git commit: bletest: Use endian.h API for protocol data

bletest: Use endian.h API for protocol data

Don't use TOFROMLE16 API for protocol data. This API hide direction of
convertion making code hard to follow.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/82674a00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/82674a00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/82674a00

Branch: refs/heads/master
Commit: 82674a00eb15a91f3755131cc2ea88788730b370
Parents: 7e1ac05
Author: Szymon Janc <sz...@codecoup.pl>
Authored: Fri Mar 24 15:50:10 2017 +0100
Committer: Szymon Janc <sz...@codecoup.pl>
Committed: Mon Apr 10 11:31:33 2017 +0200

----------------------------------------------------------------------
 apps/bletest/src/bletest_hci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/82674a00/apps/bletest/src/bletest_hci.c
----------------------------------------------------------------------
diff --git a/apps/bletest/src/bletest_hci.c b/apps/bletest/src/bletest_hci.c
index 86d2293..3cac170 100755
--- a/apps/bletest/src/bletest_hci.c
+++ b/apps/bletest/src/bletest_hci.c
@@ -115,8 +115,7 @@ bletest_send_ltk_req_reply(uint16_t handle)
         return -1;
     }
 
-    ack_conn_handle = TOFROMLE16(ack_conn_handle);
-    if (ack_conn_handle != handle) {
+    if (le16toh(ack_conn_handle) != conn_handle) {
         return -1;
     }
     return 0;