* listening socket not notified when bluetoothd stops, but becomes unusable
@ 2011-01-05 11:48 Ilya Basin
2011-01-05 12:56 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Basin @ 2011-01-05 11:48 UTC (permalink / raw)
To: linux-bluetooth
I use nonblocking sockets and select(). When I restart bluetoothd,
select() doen't return, but the listening socket won't accept
connections anymore. How to handle this correctly?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: listening socket not notified when bluetoothd stops, but becomes unusable
2011-01-05 11:48 listening socket not notified when bluetoothd stops, but becomes unusable Ilya Basin
@ 2011-01-05 12:56 ` Luiz Augusto von Dentz
2011-01-05 13:34 ` Re[2]: " Ilya Basin
0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2011-01-05 12:56 UTC (permalink / raw)
To: Ilya Basin; +Cc: linux-bluetooth
Hi,
On Wed, Jan 5, 2011 at 1:48 PM, Ilya Basin <basinilya@gmail.com> wrote:
> I use nonblocking sockets and select(). When I restart bluetoothd,
> select() doen't return, but the listening socket won't accept
> connections anymore. How to handle this correctly?
If you are using BDADDR_ANY than that is probably ok, now for specific
adapter this could be a bug but Im not sure about the powered state
before you restart and if RememberPowered is set, it could be that the
adapter is powered off after bluetoothd restart than you won't be able
to accept connections.
--
Luiz Augusto von Dentz
Computer Engineer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re[2]: listening socket not notified when bluetoothd stops, but becomes unusable
2011-01-05 12:56 ` Luiz Augusto von Dentz
@ 2011-01-05 13:34 ` Ilya Basin
0 siblings, 0 replies; 3+ messages in thread
From: Ilya Basin @ 2011-01-05 13:34 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi.
LAvD> If you are using BDADDR_ANY than that is probably ok, now for specific
LAvD> adapter this could be a bug
I just copied the code from someone else's project:
sdpSession = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);
I understand now, why select() doesn't return, but I still can't
connect.
LAvD> adapter is powered off after bluetoothd restart than you won't be able
LAvD> to accept connections.
If I restart my program after restarting bluetoothd, it accepts
connections.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-05 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05 11:48 listening socket not notified when bluetoothd stops, but becomes unusable Ilya Basin
2011-01-05 12:56 ` Luiz Augusto von Dentz
2011-01-05 13:34 ` Re[2]: " Ilya Basin
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.