Bluetooth: L2CAP: Use BR definition on connection success

This fixes BR L2CAP to use BT_L2CAP_BR_SUCCESS.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2018-03-20 17:06:33 +01:00 committed by Johan Hedberg
parent 9705f4af46
commit d458f1e7a2

View File

@ -757,7 +757,7 @@ static void l2cap_br_conn_req(struct bt_l2cap_br *l2cap, u8_t ident,
/* Reply on connection request as acceptor */
l2cap_br_conn_req_reply(chan, result);
if (result != BT_L2CAP_SUCCESS) {
if (result != BT_L2CAP_BR_SUCCESS) {
/* Disconnect link when security rules were violated */
if (result == BT_L2CAP_BR_ERR_SEC_BLOCK) {
bt_conn_disconnect(conn,
@ -1440,7 +1440,7 @@ static void l2cap_br_conn_pend(struct bt_l2cap_chan *chan, u8_t status)
* For incoming connection state send confirming outstanding
* response and initiate configuration request.
*/
if (l2cap_br_conn_req_reply(chan, BT_L2CAP_SUCCESS) == 0) {
if (l2cap_br_conn_req_reply(chan, BT_L2CAP_BR_SUCCESS) == 0) {
bt_l2cap_chan_set_state(chan, BT_L2CAP_CONFIG);
/*
* Initialize config request since remote needs to know