]> git.neil.brown.name Git - history.git/commitdiff
[Bluetooth] Fix connection creation error handling
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 20 Jun 2004 18:12:17 +0000 (20:12 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 20 Jun 2004 18:12:17 +0000 (20:12 +0200)
This patch fixes the problem that ACL connections are removed from
the kernel connection hash when a hci_create_connection returns a
command status other than 0x00.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index ab63024de433d9346dd1405871882ca5e5f72169..dc7d5424a33375e89cf2fa89e5e45d1c74b11fa9 100644 (file)
@@ -358,7 +358,7 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
                        status, batostr(&cp->bdaddr), conn);
 
        if (status) {
-               if (conn) {
+               if (conn && conn->state == BT_CONNECT) {
                        conn->state = BT_CLOSED;
                        hci_proto_connect_cfm(conn, status);
                        hci_conn_del(conn);