diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-06-05 11:24:07 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-06-11 13:02:41 +0300 |
commit | 3f7db3a10c015cfb9a82a303dba65e716bd07250 (patch) | |
tree | 8db1d7aa34b6f7271dc35eb452324f856acc618c /src | |
parent | 39024fee448005d8443bd44b80243d38ff862797 (diff) | |
download | connman-3f7db3a10c015cfb9a82a303dba65e716bd07250.tar.gz connman-3f7db3a10c015cfb9a82a303dba65e716bd07250.tar.bz2 connman-3f7db3a10c015cfb9a82a303dba65e716bd07250.zip |
config: Set config information in service
This is needed so that service can know if the
config file is removed when connmand is not running.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index 99316215..253c277e 100644 --- a/src/config.c +++ b/src/config.c @@ -49,6 +49,8 @@ struct connman_config_service { char *phase2; char *passphrase; GSList *service_identifiers; + char *config_ident; /* file prefix */ + char *config_entry; /* entry name */ }; struct connman_config { @@ -166,6 +168,8 @@ static void unregister_service(gpointer data) g_free(config_service->phase2); g_free(config_service->passphrase); g_slist_free_full(config_service->service_identifiers, g_free); + g_free(config_service->config_ident); + g_free(config_service->config_entry); g_free(config_service); } @@ -375,6 +379,9 @@ static int load_service(GKeyFile *keyfile, const char *group, service->passphrase = str; } + service->config_ident = g_strdup(config->ident); + service->config_entry = g_strdup_printf("service_%s", service->ident); + if (service_created) g_hash_table_insert(config->service_table, service->ident, service); @@ -770,6 +777,9 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data) __connman_service_set_favorite(service, TRUE); + __connman_service_set_config(service, config->config_ident, + config->config_entry); + if (config->eap != NULL) __connman_service_set_string(service, "EAP", config->eap); |