All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Mikel Astiz <Mikel.Astiz@bmw-carit.de>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Mikel Astiz <mikel.astiz.oss@gmail.com>
Subject: Re: [PATCH BlueZ v0 1/7] btio: Fix bind SCO socket only if server
Date: Thu, 12 Apr 2012 12:18:32 +0300	[thread overview]
Message-ID: <20120412091832.GA8109@x220.ger.corp.intel.com> (raw)
In-Reply-To: <66BD268F973E3544A665E5F503FB38B71AFB7646BB@DC01.bmw-carit.intra>

Hi Mikel,

On Thu, Apr 12, 2012, Mikel Astiz wrote:
> If I understand this correctly, this means we need some kernel
> patches. Either (a) we add the source address in sockaddr_sco so we
> can drop the bind() call (because sco_sock_connect would already
> receive both addresses), or (b) we modify sco_sock_bind such that it
> doesn't complain with EADDRINUSE.
> 
> I don't have much experience with sockets but the second approach
> seems a workaround to me.

Actually b) sounds more like a bugfix than a workaround (and a doesn't
sound like a good idea at all). Returning that error only makes sense
for server sockets but we can't know if this is a server socket or not
at the bind stage. What should probably be done is that the EADDRINUSE
isn't returned for bind() but for listen().

Johan

  reply	other threads:[~2012-04-12  9:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  6:57 [PATCH BlueZ v0 0/7] Multiple Bluetooth SCO connections (userspace) Mikel Astiz
2012-04-11  6:57 ` [PATCH BlueZ v0 1/7] btio: Fix bind SCO socket only if server Mikel Astiz
2012-04-11 11:20   ` Luiz Augusto von Dentz
2012-04-11 12:20     ` Luiz Augusto von Dentz
2012-04-12  8:58       ` Mikel Astiz
2012-04-12  9:18         ` Johan Hedberg [this message]
2012-04-12 15:29           ` Mikel Astiz
2012-04-11  6:57 ` [PATCH BlueZ v0 2/7] audio: Fix gateway state check Mikel Astiz
2012-04-11 11:21   ` Luiz Augusto von Dentz
2012-04-11  6:57 ` [PATCH BlueZ v0 3/7] audio: Add multiple device search to manager Mikel Astiz
2012-04-17 12:20   ` Luiz Augusto von Dentz
2012-04-17 14:12     ` Mikel Astiz
2012-04-11  6:57 ` [PATCH BlueZ v0 4/7] media: Support multiple transports per endpoint Mikel Astiz
2012-04-17 12:30   ` Luiz Augusto von Dentz
2012-04-11  6:57 ` [PATCH BlueZ v0 5/7] media: Create multiple transports if needed Mikel Astiz
2012-04-11  6:57 ` [PATCH BlueZ v0 6/7] media: Enable parallel requests to endpoint Mikel Astiz
2012-04-17 12:33   ` Luiz Augusto von Dentz
2012-04-11  6:57 ` [PATCH BlueZ v0 7/7] media: Increase hardcoded incoming MTU Mikel Astiz
2012-04-17 12:41   ` Luiz Augusto von Dentz

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=20120412091832.GA8109@x220.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=Mikel.Astiz@bmw-carit.de \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mikel.astiz.oss@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.