diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2007-06-19 08:12:36 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2007-06-19 08:12:36 +0000 |
commit | adfc604b4653fa8423fe973bac1cf07a412e20b3 (patch) | |
tree | 7ba46758fd4a318df8facd59c7640c4316342e03 /sys/netbt/hci_link.c | |
parent | ef866e0119ad473b081d3902f0f5e2c2acce84eb (diff) |
Abort all pending ACL connections when we get an HCI command parameter
error in response to a HCI_CMD_CREATE_CON command instead of waiting
that the user aborts due to boredom. Unfortunately, the command status
event does not include a hint to tells us which connection failed.
Diffstat (limited to 'sys/netbt/hci_link.c')
-rw-r--r-- | sys/netbt/hci_link.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/netbt/hci_link.c b/sys/netbt/hci_link.c index a62cc8a3ead..4b3842b99b8 100644 --- a/sys/netbt/hci_link.c +++ b/sys/netbt/hci_link.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_link.c,v 1.3 2007/06/06 18:32:55 uwe Exp $ */ +/* $OpenBSD: hci_link.c,v 1.4 2007/06/19 08:12:35 uwe Exp $ */ /* $NetBSD: hci_link.c,v 1.11 2007/04/21 06:15:23 plunky Exp $ */ /*- @@ -991,6 +991,22 @@ hci_link_free(struct hci_link *link, int err) } /* + * Lookup HCI link by type and state. + */ +struct hci_link * +hci_link_lookup_state(struct hci_unit *unit, uint16_t type, uint16_t state) +{ + struct hci_link *link; + + TAILQ_FOREACH(link, &unit->hci_links, hl_next) { + if (link->hl_type == type && link->hl_state == state) + break; + } + + return link; +} + +/* * Lookup HCI link by address and type. Note that for SCO links there may * be more than one link per address, so we only return links with no * handle (ie new links) |