X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fbluetooth%2Fhci_event.c;h=8d8e775cac190aec738ac77913f694755c36298b;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=ab63024de433d9346dd1405871882ca5e5f72169;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index ab63024de..8d8e775ca 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -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); @@ -486,7 +486,7 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff * hci_dev_lock(hdev); for (; num_rsp; num_rsp--) - inquiry_cache_update(hdev, info++); + hci_inquiry_cache_update(hdev, info++); hci_dev_unlock(hdev); } @@ -508,7 +508,7 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct memcpy(tmp.dev_class, &info->dev_class, 3); tmp.clock_offset = info->clock_offset; info++; - inquiry_cache_update(hdev, &tmp); + hci_inquiry_cache_update(hdev, &tmp); } hci_dev_unlock(hdev); }