Rename AllowedTetheringTechnologies to TetheredTechnologies to be consistent with the related PreferredTechnologies naming. ---
Notice that this patch is now using the word 'Tethered' ending with 'ed'. I can spin a new naming patch anytime, comments on this one? src/main.c | 18 +++++++++--------- src/main.conf | 12 +++++++----- src/technology.c | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/main.c b/src/main.c index 0d58fc4..8c32dc5 100644 --- a/src/main.c +++ b/src/main.c @@ -70,7 +70,7 @@ static struct { char **blacklisted_interfaces; connman_bool_t allow_hostname_updates; connman_bool_t single_tech; - char **allowed_tethering_technologies; + char **tethered_technologies; connman_bool_t persistent_tethering_mode; } connman_settings = { .bg_scan = TRUE, @@ -83,7 +83,7 @@ static struct { .blacklisted_interfaces = NULL, .allow_hostname_updates = TRUE, .single_tech = FALSE, - .allowed_tethering_technologies = NULL, + .tethered_technologies = NULL, .persistent_tethering_mode = FALSE, }; @@ -97,7 +97,7 @@ static struct { #define CONF_BLACKLISTED_INTERFACES "NetworkInterfaceBlacklist" #define CONF_ALLOW_HOSTNAME_UPDATES "AllowHostnameUpdates" #define CONF_SINGLE_TECH "SingleConnectedTechnology" -#define CONF_ALLOWED_TETHERING_TECHNOLOGIES "AllowedTetheringTechnologies" +#define CONF_TETHERED_TECHNOLOGIES "TetheredTechnologies" #define CONF_PERSISTENT_TETHERING_MODE "PersistentTetheringMode" static const char *supported_options[] = { @@ -111,7 +111,7 @@ static const char *supported_options[] = { CONF_BLACKLISTED_INTERFACES, CONF_ALLOW_HOSTNAME_UPDATES, CONF_SINGLE_TECH, - CONF_ALLOWED_TETHERING_TECHNOLOGIES, + CONF_TETHERED_TECHNOLOGIES, CONF_PERSISTENT_TETHERING_MODE, NULL }; @@ -338,10 +338,10 @@ static void parse_config(GKeyFile *config) g_clear_error(&error); tethering = g_key_file_get_string_list(config, "General", - CONF_ALLOWED_TETHERING_TECHNOLOGIES, &len, &error); + CONF_TETHERED_TECHNOLOGIES, &len, &error); if (error == NULL) - connman_settings.allowed_tethering_technologies = tethering; + connman_settings.tethered_technologies = tethering; g_clear_error(&error); @@ -540,8 +540,8 @@ char **connman_setting_get_string_list(const char *key) if (g_str_equal(key, CONF_BLACKLISTED_INTERFACES) == TRUE) return connman_settings.blacklisted_interfaces; - if (g_str_equal(key, CONF_ALLOWED_TETHERING_TECHNOLOGIES) == TRUE) - return connman_settings.allowed_tethering_technologies; + if (g_str_equal(key, CONF_TETHERED_TECHNOLOGIES) == TRUE) + return connman_settings.tethered_technologies; return NULL; } @@ -752,7 +752,7 @@ int main(int argc, char *argv[]) g_free(connman_settings.preferred_techs); g_strfreev(connman_settings.fallback_nameservers); g_strfreev(connman_settings.blacklisted_interfaces); - g_strfreev(connman_settings.allowed_tethering_technologies); + g_strfreev(connman_settings.tethered_technologies); g_free(option_debug); diff --git a/src/main.conf b/src/main.conf index eff312d..c85cf1e 100644 --- a/src/main.conf +++ b/src/main.conf @@ -77,17 +77,19 @@ # normal. Default value is false. # SingleConnectedTechnology = false -# List of technologies that are allowed to enable tethering separated by ",". -# The default value is wifi,bluetooth,gadget. Only those technologies listed -# here are used for tethering. If one wants to tether ethernet, -# then add "ethernet" in the list. +# List of technologies for which tethering is allowed separated by ",". +# The default value is wifi,bluetooth,gadget. Only those technologies +# listed here are used for tethering. If ethernet tethering is desired, +# then ethernet should be added to the list. The technologies listed here +# have to support tethering, currently tethering is implemented for wifi, +# bluetooth, gadget and ethernet. # NOTE that if ethernet tethering is enabled, then a DHCP server is # started on all ethernet interfaces. Tethered ethernet should # never be connected to corporate or home network as it will disrupt # normal operation of these networks. Due to this ethernet is not # tethered by default. Do not activate ethernet tethering unless you # really know what you are doing. -# AllowedTetheringTechnologies = wifi,bluetooth,gadget +# TetheredTechnologies = wifi,bluetooth,gadget # Restore earlier tethering status when returning from offline mode, # re-enabling a technology, and after restarts and reboots. diff --git a/src/technology.c b/src/technology.c index f214367..f2d8a72 100644 --- a/src/technology.c +++ b/src/technology.c @@ -115,7 +115,7 @@ connman_technology_is_tethering_allowed(enum connman_service_type type) if (type_str == NULL) return FALSE; - allowed = connman_setting_get_string_list("AllowedTetheringTechnologies"); + allowed = connman_setting_get_string_list("TetheredTechnologies"); if (allowed == NULL) allowed = allowed_default; -- 1.7.10.4 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman