On 02/04/15 12:35, Tomasz Bursztyka wrote:
> Hi Slava,
>
>> It appears that the client is responsible for removing network
>> configurations it has created, which makes sense to me. In an
>> environment with unstable wifi reception, connman may end up creating
>> hundreds of those in just one day of normal usage.
>
> Well this is true if it always fail connecting to hundreds different
> networks yes (and only at SelectNetwork).
> That's the only possibility. So indeed there is a bug, but unlikely
> to happen.


Try this: connect to wifi, walk out of the wifi range, wait for connman
to realize that, return back into the range, wait for connman to
re-connect and compare 'wpa_cli list_net' before and after the exercise.
What do you get?

I'm consistently getting from 1 to 3 new network configurations per each
trip outside of the wifi range.


> Your patch is fine but it is not removing the network at the right
> place then.
> You should do it in interface_select_network_result() if that one
> returns an error.
> So the network is removed as soon as possible.


"As soon as possible" is where I put it. By the time it gets to
interface_select_network_result() the previous path is lost.


>
> I don't think there is any other case matching this situation: when we
> disconnect,
> we remove the network. If AddNetwork fails, no need to remove anything.
> I think it should be fine then.
>
> Also, try reusing existing code: network_remove() does what you want
> already.

network_remove() requires allocation of another interface_data which in
this case was unnecessary and would require writing more code than I
wanted to.

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

Reply via email to