On 02/04/15 09:25, Patrik Flykt wrote:
> @@ -4041,6 +4046,15 @@ static void interface_add_network_result(const char 
> *error,
>  
>       SUPPLICANT_DBG("PATH: %s", path);
>  
> +     if (interface->network_path && strcmp(interface->network_path, path)) {
> +             /* Prevent unused wpa_supplicant networks from piling up */
> +             SUPPLICANT_DBG("Removing network %s", interface->network_path);
> +             supplicant_dbus_method_call(interface->path,
> +                     SUPPLICANT_INTERFACE ".Interface", "RemoveNetwork",
> +                     objpath_param, NULL, interface->network_path,
> +                     interface);
> +     }
> +
> Why do we care about how wpa_supplicant internally handles its networks
> at this point, especially for the wpa_cli tool? AFAIK wpa_supplicant
> will clear out networks after ~2 mins if they haven't been seen in a
> later scan.


Strictly speaking it's not much of a problem for connman since it's
wpa_supplicant who is going to run out of memory.

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.


> What is the logic to remove something that apparently isn't matching the
> provided user data? How is this even possible?


I don't quite understand what you mean by "provided user data" but
data->interface->network_path points to the path of the previously
created network configuration and that's all the data one needs to
remove it when it's not longer needed.


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

Reply via email to