public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] socket connect returns EAGAIN
Date: Wed, 20 Sep 2006 17:05:15 +0200	[thread overview]
Message-ID: <1158764715.10356.0.camel@localhost> (raw)
In-Reply-To: <d23110170609200748u4d16a947q9cfa716825ea44b7@mail.gmail.com>

Hi Ulisses,

> > > > > I think the problem is in bt_sock_wait_state(...). This always returns
> > > > > -EAGAIN if timeout is zero (which it is if the socket is set non
> > > > > blocking). But may be I'm missing something.
> > > >
> > > > I've come to a similar conclusion. I'm not sure why it's returning -EAGAIN.
> > > > However, looking at the x25 transport (af_x25.c), it takes a different
> > > > approach;
> > > > if O_NONBLOCK is set they don't call the blocking routine at all. Maybe a
> > > > similar approach should be taken here.
> > > >
> > > returning EAGAIN is fine for a listening socket. I first thought the
> > > solution of not calling bt_sock_wait_state() for a non blocking connect
> > > would be the easiest solution, too. But then you have to correct it on
> > > several places. Just changing bt_sock_wait_state() will solve it for
> > > various socket types.
> >
> > sounds like a good idea. Anyone preparing a patch for it?
> 
> Sorry, but I'm failing to see why we can't just do a
> s/EAGAIN/EINPROGRESS/ inside bt_sock_wait_state(). Does anyone mind to
> explain, please?

what about the server socket. In this case EAGAIN is fine.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  parent reply	other threads:[~2006-09-20 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12  0:47 [Bluez-devel] socket connect returns EAGAIN Jose Vasconcellos
2006-09-12  8:40 ` Peter Wippich
2006-09-12  8:43   ` Marcel Holtmann
2006-09-12 10:13     ` Peter Wippich
2006-09-12 10:29       ` Marcel Holtmann
2006-09-13 14:21       ` Jose Vasconcellos
2006-09-14  9:01         ` Peter Wippich
2006-09-15  9:49           ` Marcel Holtmann
2006-09-20 14:48             ` Ulisses Furquim
2006-09-20 15:00               ` Peter Wippich
2006-09-20 15:05               ` Marcel Holtmann [this message]
2006-09-21 19:59                 ` Ulisses Furquim
2006-09-21 20:05                   ` Marcel Holtmann
2006-09-22 17:47                     ` Ulisses Furquim

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=1158764715.10356.0.camel@localhost \
    --to=marcel@holtmann.org \
    --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