From bbb09e3b7378daf4f2d0d63bdc2e943c0f84c808 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Mon, 29 Apr 2013 09:21:45 +0300 Subject: main: Rename AllowedTetheringTechnologies to TetheringTechnologies --- 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 0d58fc43..c257ca0b 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 **tethering_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, + .tethering_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_TETHERING_TECHNOLOGIES "TetheringTechnologies" #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_TETHERING_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_TETHERING_TECHNOLOGIES, &len, &error); if (error == NULL) - connman_settings.allowed_tethering_technologies = tethering; + connman_settings.tethering_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_TETHERING_TECHNOLOGIES) == TRUE) + return connman_settings.tethering_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.tethering_technologies); g_free(option_debug); diff --git a/src/main.conf b/src/main.conf index eff312d9..b8b3239b 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 +# TetheringTechnologies = 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 10e61328..f210859d 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("TetheringTechnologies"); if (allowed == NULL) allowed = allowed_default; -- cgit v1.2.3