Re: [Bluez-devel] CUPS plugin discovery bits

Marcel Holtmann
2007-05-29T13:37:55Z

Hi Luiz,

> > Btw, The printer wizard as it is now wont work with periodic
> > discovery, signals DiscoveryStarted and
> > DiscoveryCompleted are not emitted while in
> periodic discovery.
>
> The cups backend isn't supposed to run forever, so it can't do
> periodic
> discovery.
>
> Well that is not the case of being running forever but you could
> probably
> test if the periodic scan is active before you start a blocking
> discovery.
> My main concern is about multiple process doing this, the probability
> of
> having collisions while doing sdp searches could be very high as it is
> very
> common to have more than one functionality in a device, this leaves
> wizard
> processes very complicated and may force them to reschedule on each
> collision .

it is fine to start an inquiry while you are in periodic inquiry. With
the exception that some chips don't allow that.

It is also fine to create an ACL link while in periodic inquiry since
the device then will stop its inquiry train automatically and switch to
page for the ACL link. After it it will continue with the periodic
inquiry as before.

The kernel now takes care of serializing the ACL link creation. This
works perfectly fine. There is one small glitch with remote name resolve
that doesn't trigger the ACL queue. However real name request have been
always a problem. However over D-Bus you only get cached names or an
error anyway. The only exception is if you in inquiry or periodic
inquiry. While the inquiry is no problem, we have to check with the
periodic inquiry if we create a deadlock.

Regards

Marcel