Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290976
b: refs/heads/master
c: e211326
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hedberg committed Feb 19, 2012
1 parent a79dd99 commit 542aa45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aee9b218036476b8b659de5bbfada3a4633f635b
refs/heads/master: e211326c0b064e8fe2a8cb51427c3f2044ad84be
14 changes: 6 additions & 8 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status)
if (!cmd)
BT_DBG("Unable to find a pending command");
else
pairing_complete(cmd, status);
pairing_complete(cmd, mgmt_status(status));
}

static int pair_device(struct sock *sk, u16 index, void *data, u16 len)
Expand All @@ -1739,7 +1739,6 @@ static int pair_device(struct sock *sk, u16 index, void *data, u16 len)
struct pending_cmd *cmd;
u8 sec_level, auth_type;
struct hci_conn *conn;
u8 status = 0;
int err;

BT_DBG("");
Expand Down Expand Up @@ -1773,17 +1772,16 @@ static int pair_device(struct sock *sk, u16 index, void *data, u16 len)
rp.addr.type = cp->addr.type;

if (IS_ERR(conn)) {
status = -PTR_ERR(conn);
err = cmd_complete(sk, index, MGMT_OP_PAIR_DEVICE, status,
&rp, sizeof(rp));
err = cmd_complete(sk, index, MGMT_OP_PAIR_DEVICE,
MGMT_STATUS_CONNECT_FAILED,
&rp, sizeof(rp));
goto unlock;
}

if (conn->connect_cfm_cb) {
hci_conn_put(conn);
status = EBUSY;
err = cmd_complete(sk, index, MGMT_OP_PAIR_DEVICE, status,
&rp, sizeof(rp));
err = cmd_complete(sk, index, MGMT_OP_PAIR_DEVICE,
MGMT_STATUS_BUSY, &rp, sizeof(rp));
goto unlock;
}

Expand Down

0 comments on commit 542aa45

Please sign in to comment.