diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2019-09-23 15:45:33 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2019-09-23 17:08:24 +0530 |
commit | a0c29c7da07fa8bf3e8839a4a64a183a02296a32 (patch) | |
tree | 6e92a0c4a208e00c275ee546b485e12c6575c145 /src/main.c | |
parent | 83d8c81d27d65f9d4a3bdc3c3685d4b03a13ab70 (diff) | |
download | connman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.tar.gz connman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.tar.bz2 connman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.zip |
Added support to enable/disable Auto-IP option.submit/tizen/20190925.080914submit/tizen/20190924.065941accepted/tizen/unified/20190926.065658
Added support to enable/disable Auto-IP option using main.conf
Change-Id: Iea1cae5a28681a90a5f79735c7374791a227feb7
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -96,6 +96,7 @@ static struct { #if defined TIZEN_EXT char **cellular_interfaces; bool tizen_tv_extension; + bool auto_ip; #endif } connman_settings = { .bg_scan = true, @@ -122,6 +123,7 @@ static struct { #if defined TIZEN_EXT .cellular_interfaces = NULL, .tizen_tv_extension = false, + .auto_ip = true, #endif }; @@ -149,6 +151,7 @@ static struct { #if defined TIZEN_EXT #define CONF_CELLULAR_INTERFACE "NetworkCellularInterfaceList" #define CONF_TIZEN_TV_EXT "TizenTVExtension" +#define CONF_ENABLE_AUTO_IP "EnableAutoIp" #endif static const char *supported_options[] = { @@ -312,6 +315,13 @@ static void check_Tizen_configuration(GKeyFile *config) connman_settings.tizen_tv_extension = boolean; g_clear_error(&error); + + boolean = __connman_config_get_bool(config, "General", + CONF_ENABLE_AUTO_IP, &error); + if (!error) + connman_settings.auto_ip = boolean; + + g_clear_error(&error); } static void set_nofile_inc(void) @@ -760,6 +770,11 @@ bool connman_setting_get_bool(const char *key) if (g_str_equal(key, CONF_USE_GATEWAYS_AS_TIMESERVERS)) return connman_settings.use_gateways_as_timeservers; +#if defined TIZEN_EXT + if (g_str_equal(key, CONF_ENABLE_AUTO_IP)) + return connman_settings.auto_ip; +#endif + return false; } |