Re: forcing SCO connection patch
"Brad Midgley" <[email protected]>
| Newsgroups | gmane.linux.bluez.devel |
|---|---|
| Message-ID | <[email protected]> |
Louis
I should clarify. It looks like the one Marcel saw was:
- if (!conn)
- goto unlock;
+ if (!conn) {
+ if (ev->link_type==SCO_LINK) {
+ conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
+ if (!conn)
+ goto unlock;
+ else
+ conn->type=SCO_LINK;
+ }
+ }
but yours was
- if (!conn)
- goto unlock;
+ if (!conn) {
+ if (ev->link_type != ACL_LINK) {
+ int t = (ev->link_type == ESCO_LINK) ? SCO_LINK : ESCO_LINK;
+ conn = hci_conn_hash_lookup_ba(hdev, t, &ev->bdaddr);
+ if (conn)
+ conn->type = ev->link_type;
+ }
+ if (!conn)
+ goto unlock;
+ }
they both have indent/space issues but I'm not sure Marcel's other
comment makes sense for what you did.
It seems like the problem is ev->link_type might have the wrong value
for the lookup to succeed, but I'm not sure what the big picture looks
like here. Is this the best place to solve it or was this a quick
workaround?
Brad
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/