diff options
author | Christopher Collins <ccollins476ad@gmail.com> | 2016-02-01 11:56:20 -0800 |
---|---|---|
committer | Christopher Collins <ccollins476ad@gmail.com> | 2016-02-01 19:40:59 -0800 |
commit | cf46c07f926c44aebbb3f79fb001af7008cda424 (patch) | |
tree | 9b8f5774982aa891e2946a1ce6e56126067f0163 /net/nimble/host/src/test/ble_l2cap_test.c | |
parent | 7674b1bf89396025022c0a893232d5c0651fd71c (diff) |
Protect connection list with a mutex
Diffstat (limited to 'net/nimble/host/src/test/ble_l2cap_test.c')
-rw-r--r-- | net/nimble/host/src/test/ble_l2cap_test.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/net/nimble/host/src/test/ble_l2cap_test.c b/net/nimble/host/src/test/ble_l2cap_test.c index 52aa836c..07ce5c33 100644 --- a/net/nimble/host/src/test/ble_l2cap_test.c +++ b/net/nimble/host/src/test/ble_l2cap_test.c @@ -89,7 +89,7 @@ ble_l2cap_test_util_rx_update_req(struct ble_hs_conn *conn, uint8_t id, v, BLE_L2CAP_SIG_HDR_SZ + BLE_L2CAP_SIG_UPDATE_REQ_SZ, &sig_hdr, &req); TEST_ASSERT_FATAL(rc == 0); - rc = ble_l2cap_rx(conn, &hci_hdr, om); + rc = ble_hs_test_util_l2cap_rx(conn, &hci_hdr, om); TEST_ASSERT_FATAL(rc == 0); } @@ -128,7 +128,7 @@ ble_l2cap_test_util_rx_update_rsp(struct ble_hs_conn *conn, v, BLE_L2CAP_SIG_HDR_SZ + BLE_L2CAP_SIG_UPDATE_RSP_SZ, &sig_hdr, &rsp); TEST_ASSERT_FATAL(rc == 0); - rc = ble_l2cap_rx(conn, &hci_hdr, om); + rc = ble_hs_test_util_l2cap_rx(conn, &hci_hdr, om); return rc; } @@ -215,8 +215,7 @@ ble_l2cap_test_util_verify_tx_update_conn( } static int -ble_l2cap_test_util_dummy_rx(struct ble_hs_conn *conn, - struct ble_l2cap_chan *chan, struct os_mbuf **om) +ble_l2cap_test_util_dummy_rx(uint16_t conn_handle, struct os_mbuf **om) { return 0; } @@ -266,7 +265,7 @@ ble_l2cap_test_util_rx_first_frag(struct ble_hs_conn *conn, hci_len = sizeof hci_hdr + l2cap_frag_len; hci_hdr = BLE_L2CAP_TEST_UTIL_HCI_HDR(conn->bhc_handle, BLE_HCI_PB_FIRST_FLUSH, hci_len); - rc = ble_l2cap_rx(conn, &hci_hdr, om); + rc = ble_hs_test_util_l2cap_rx(conn, &hci_hdr, om); return rc; } @@ -286,7 +285,7 @@ ble_l2cap_test_util_rx_next_frag(struct ble_hs_conn *conn, uint16_t hci_len) hci_hdr = BLE_L2CAP_TEST_UTIL_HCI_HDR(conn->bhc_handle, BLE_HCI_PB_MIDDLE, hci_len); - rc = ble_l2cap_rx(conn, &hci_hdr, om); + rc = ble_hs_test_util_l2cap_rx(conn, &hci_hdr, om); return rc; } @@ -339,7 +338,7 @@ TEST_CASE(ble_l2cap_test_case_bad_header) ble_l2cap_test_util_init(); conn = ble_l2cap_test_util_create_conn(2, ((uint8_t[]){1,2,3,4,5,6}), - NULL, NULL); + NULL, NULL); rc = ble_l2cap_test_util_rx_first_frag(conn, 14, 1234, 10); TEST_ASSERT(rc == BLE_HS_ENOENT); @@ -370,7 +369,7 @@ TEST_CASE(ble_l2cap_test_case_frag_single) om = ble_l2cap_prepend_hdr(om, 0, 5); TEST_ASSERT_FATAL(om != NULL); - rc = ble_l2cap_rx(conn, &hci_hdr, om); + rc = ble_hs_test_util_l2cap_rx(conn, &hci_hdr, om); TEST_ASSERT(rc == BLE_HS_EBADDATA); /*** Packet consisting of three fragments. */ |