Thanks Guys.
Sorry for the confusion. I am on 1.27 with some of our local changes.
Here is the snippet from log stating that:
messages#1523:2015-01-15 04:54:09.000000 02AA01AC4013043X daemon.info
connmand[299]: Connection Manager version 1.27
One of the local changes that I had was to ensure that in case call to
supplicant fails we need to decrement the refcount which was incremented
just before doing this call g_supplicant_interface_connect. This was not
done correctly at our side. It did not account for the fact that this call
would always return -EINPROGRESS.
But I think it is good to have this fix for cases when there are failures:
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 97f7144..863109d 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2207,7 +2207,7 @@ static int network_connect(struct connman_network
*network)
ret = g_supplicant_interface_connect(interface, ssid,
connect_callback, network);
- if (ret < 0) {
+ if (ret < 0 && ret != -EINPROGRESS) {
connman_network_unref(network);
}
If you guys agree I can put a patch.
Let me know your thoughts and thanks for all your prompt help.
Regards
Naveen
On Thu, Jan 15, 2015 at 12:08 AM, Patrik Flykt <[email protected]
> wrote:
> On Wed, 2015-01-14 at 19:40 -0800, Naveen Singh wrote:
> > Do you guys think if the following make sense:
> >
> > diff --git a/plugins/wifi.c b/plugins/wifi.c
> > index 97f7144..863109d 100644
> > --- a/plugins/wifi.c
> > +++ b/plugins/wifi.c
> > @@ -2207,7 +2207,7 @@ static int network_connect(struct connman_network
> > *network)
> > ret = g_supplicant_interface_connect(interface, ssid,
> > connect_callback, network);
> >
> > - if (ret < 0) {
> > + if (ret < 0 && ret != -EINPROGRESS) {
> > connman_network_unref(network);
> > }
>
> This would make sense, except that the same code in upstream looks like
> this:
>
> static int network_connect(struct connman_network *network)
> ...
> if (wifi->disconnecting) {
> wifi->pending_network = network;
> g_free(ssid);
> } else {
> wifi->network = connman_network_ref(network);
> wifi->retries = 0;
>
> return g_supplicant_interface_connect(interface, ssid,
> connect_callback, network);
> }
>
> return -EINPROGRESS;
> }
>
> You are obviously working on a non-upstream version of ConnMan.
>
> Cheers,
>
> Patrik
>
>
> _______________________________________________
> connman mailing list
> [email protected]
> https://lists.connman.net/mailman/listinfo/connman
>
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman