summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-23 14:52:38 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-23 14:52:38 -0800
commita714e940fbfd0ccefd63879189fbfa1306fbdf13 (patch)
tree86e4a1b7bd175824941ecb737ae37dfae56057c0 /src/config.c
parent61d27f457278f7224f35e139db8aaf32762e1970 (diff)
downloadconnman-a714e940fbfd0ccefd63879189fbfa1306fbdf13.tar.gz
connman-a714e940fbfd0ccefd63879189fbfa1306fbdf13.tar.bz2
connman-a714e940fbfd0ccefd63879189fbfa1306fbdf13.zip
Some more whitespace cleanups
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/config.c b/src/config.c
index d36b5e6d..eb083e09 100644
--- a/src/config.c
+++ b/src/config.c
@@ -108,20 +108,22 @@ static int load_service(GKeyFile *keyfile, struct connman_config *config)
service->ca_cert_file = str;
}
- str = g_key_file_get_string(keyfile, "service", "ClientCertFile", NULL);
+ str = g_key_file_get_string(keyfile, "service",
+ "ClientCertFile", NULL);
if (str != NULL) {
g_free(service->client_cert_file);
service->client_cert_file = str;
}
- str = g_key_file_get_string(keyfile, "service", "PrivateKeyFile", NULL);
+ str = g_key_file_get_string(keyfile, "service",
+ "PrivateKeyFile", NULL);
if (str != NULL) {
g_free(service->private_key_file);
service->private_key_file = str;
}
- str = g_key_file_get_string(keyfile, "service", "PrivateKeyPassphrase",
- NULL);
+ str = g_key_file_get_string(keyfile, "service",
+ "PrivateKeyPassphrase", NULL);
if (str != NULL) {
g_free(service->private_key_passphrase);
service->private_key_passphrase = str;
@@ -144,7 +146,6 @@ static int load_service(GKeyFile *keyfile, struct connman_config *config)
if (error == NULL)
service->passphrase_from_fsid = pass_from_fsid;
-
return 0;
}
@@ -318,19 +319,19 @@ static void config_service_setup(struct connman_service *service,
if (config->identity)
__connman_service_set_string(service, "Identity",
- config->identity);
+ config->identity);
if (config->ca_cert_file)
__connman_service_set_string(service, "CACertFile",
- config->ca_cert_file);
+ config->ca_cert_file);
if (config->client_cert_file)
__connman_service_set_string(service, "ClientCertFile",
- config->client_cert_file);
+ config->client_cert_file);
if (config->private_key_file)
__connman_service_set_string(service, "PrivateKeyFile",
- config->private_key_file);
+ config->private_key_file);
if (config->passphrase_from_fsid == TRUE &&
config->private_key_file) {
@@ -346,7 +347,7 @@ static void config_service_setup(struct connman_service *service,
if (config->private_key_passphrase) {
__connman_service_set_string(service, "PrivateKeyPassphrase",
- config->private_key_passphrase);
+ config->private_key_passphrase);
/*
* TODO: Support for PEAP with both identity and key passwd.
* In that case, we should check if both of them are found
@@ -355,7 +356,7 @@ static void config_service_setup(struct connman_service *service,
* additional passphrase.
*/
__connman_service_set_string(service, "Passphrase",
- config->private_key_passphrase);
+ config->private_key_passphrase);
}
if (config->phase2)
@@ -404,16 +405,17 @@ int __connman_config_provision_service(struct connman_service *service)
}
g_hash_table_iter_init(&iter, config_hash);
+
while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
config = value;
- /* For now we only support wifi services entries */
+ /* For now only WiFi service entries are supported */
if (config->service &&
g_strcmp0(config->service->type, "wifi") == 0 &&
ssid_len == config->service->ssid_len)
if (config->service->ssid &&
memcmp(config->service->ssid, ssid,
- ssid_len) == 0)
+ ssid_len) == 0)
break;
}