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.

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.

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.

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

Reply via email to