public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Brad Midgley" <bmidgley@gmail.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] forcing SCO connection patch
Date: Sun, 24 Feb 2008 23:56:29 -0700	[thread overview]
Message-ID: <d89ddf300802242256m699a9130se4257e4041f2b0b9@mail.gmail.com> (raw)
In-Reply-To: <d89ddf300802242243t9503c11ye3d5d2bc7ae1cebb@mail.gmail.com>

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/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2008-02-25  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 12:39 [Bluez-devel] forcing SCO connection patch Louis JANG
2008-02-25  6:43 ` Brad Midgley
2008-02-25  6:56   ` Brad Midgley [this message]
2008-02-26 19:19   ` Guillaume Bedot
2008-02-26 19:28     ` Marcel Holtmann
2008-02-26 21:05       ` Guillaume Bedot
     [not found] ` <a8e1da0802242330l765b8b1ava62b857baf8a5568@mail.gmail.com>
     [not found]   ` <47C28A33.4070102@mizi.com>
     [not found]     ` <a8e1da0802250155u1b7af481va203849f68d9106b@mail.gmail.com>
     [not found]       ` <47C2A7FA.2060902@mizi.com>
     [not found]         ` <70692DDF-93B7-447E-ABEE-3CDBD94F15F1@holtmann.org>
     [not found]           ` <47C38D40.3040809@mizi.com>
     [not found]             ` <B96BD3FE-F490-4AD5-9315-ECD42CE9C728@holtmann.org>
     [not found]               ` <47C4C3D4.8010902@mizi.com>
     [not found]                 ` <2A7EF87C-1340-45D7-B457-F81799674B1E@holtmann.org>
     [not found]                   ` <47C555E5.2000903@mizi.com>
2008-02-27 13:04                     ` Guillaume Bedot
     [not found]                     ` <5D9353FF-6A69-4039-9033-C0EBD1CDA756@holtmann.org>
     [not found]                       ` <47C62147.90007@mizi.com>
2008-02-28 10:57                         ` Guillaume Bedot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d89ddf300802242256m699a9130se4257e4041f2b0b9@mail.gmail.com \
    --to=bmidgley@gmail.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox