On 01/13/2015 01:28 AM, Patrik Flykt wrote:
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.

It sounds like this internal usage is leaking externally.

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,
This does not seem to be happening in the case of enabling/disabling tethering for the bluetooth technology. I am guessing that instead of waiting, the internal -EINPROGRESS is being returned instead.
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.
Right, this is what I would expect, but like I said, this is returning the EINPROGRESS error on the *first* attempt, not on a subsequent attempt.

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'm not really following you here.

I'd say if technology enabling fails regularly from e.g. connmanctl,
then it most likely is a bug - patches are welcome :-)
The problem is *not* the failure of enabling a technology. It is the return of an error upon success of enabling/disabling tethering on a technology.

From your first remarks though, it sounds like a patch is in order so that the -EINPROGRESS does not bubble up from the internal usage all the way to D-Bus when enabling tethering on the first attempt, but rather blocks until the operation is complete. Any attempt to enable tethering again while the first attempt is still blocking would of course return an in progress error via D-Bus.

HTH,

        Patrik


_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to