Re: [PATCH 2/3] technology: Leverage 'DefaultEnabledTechnologies' setting.
Denis Kenzior <[email protected]> Mon, 4 Aug 2025 13:27:43 -0500
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
Hi Grant,
On 7/28/25 5:32 PM, Grant Erickson wrote:
> This leverages the new 'DefaultEnabledTechnologies' configuration
> setting.
> ---
> src/technology.c | 25 +++++++++++++++----------
> 1 file changed, 15 insertions(+), 10 deletions(-)
>
<snip>
> @@ -429,19 +429,27 @@ static void technology_load(struct connman_technology *technology)
> GKeyFile *keyfile;
> gchar *identifier;
> GError *error = NULL;
> - bool enable, need_saving = false;
> + bool enable, need_saving = false, enable_persistent = false;
> char *enc;
> + int i;
> + unsigned int *enabled_types;
>
> DBG("technology %p", technology);
>
> + /* Determine which technology types are enabled by default */
> +
> + enabled_types = connman_setting_get_uint_list("DefaultEnabledTechnologies");
I amended this patch slightly to avoid > 80 character line. I moved this
initializer to the variable declaration block.
Perhaps instead of duplicating these strings everywhere, the CONF_* defines
should move somewhere as public API?
> + for (i = 0; enabled_types && enabled_types[i] != 0; i++) {
> + if (technology->type == enabled_types[i]) {
> + enable_persistent = true;
> + break;
> + }
> + }
> +
Regards,
-Denis