On Mon, 2015-01-12 at 17:26 -0600, David Lechner wrote:
> I noticed that when enabling tethering on bluetooth (using 1.27) that it
> says "Error enabling bluetooth tethering: In progress". Same with
> disabling: "Error disabling bluetooth tethering: In progress".
>
> Other technologies (tested wifi and gadget) don't return an error like this.
>
> I had a look at plugins/bluetooth.c and quite a few of the functions
> return -EINPROGRESS upon successful completion. What is the purpose of
> this? The error is certainly misleading. I'd be glad to write a patch if
> it is really not necessary.
Internally -EINPROGRESS signals that work is taking place to complete
whatever the request is. Externally signalling -EINPROGRESS depends a
bit on who is doing what.
With no outstanding requests for a particular task, the initiator of a
ConnMan D-Bus method call will have to wait until the task is completed,
i.e. the D-Bus method call is pending for the initiator. Any subsequent
attempt to perform the same task (or another one somehow blocked by the
initial task) will receive a -EINPROGRESS or similar pretty much
instantly.
To return to your original question, it actually depends. It may very
well be that ConnMan did something internally by itself which the code
interpreted as being in progress, it may be there actually was already
some other entity doing the same thing or then it's just a plain bug.
One should be able to find out whether its a bug or an intended feature
by staring at the code. If neither of these applies then a hunt for some
other entity doing stuff with ConnMan is started. Usually it should be a
well-known issue whether this last scenario is the one happening, but
one never knows.
I'd say if technology enabling fails regularly from e.g. connmanctl,
then it most likely is a bug - patches are welcome :-)
HTH,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman