summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-12-24 00:55:32 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-12-23 19:29:01 -0800
commit4ffb42c8fb8f0d9c2189ba6fbcb1fded222cb68d (patch)
treedd77268f23e30a4b1e3e508407cf6089520f3ccc /src
parent2b6c343612c961ec7744bcd2f7d5d47f7862f2c1 (diff)
downloadconnman-4ffb42c8fb8f0d9c2189ba6fbcb1fded222cb68d.tar.gz
connman-4ffb42c8fb8f0d9c2189ba6fbcb1fded222cb68d.tar.bz2
connman-4ffb42c8fb8f0d9c2189ba6fbcb1fded222cb68d.zip
More config.c copy and paste fixes
In __connman_config_provision_service(), the config pointer was always set to the last service entry found from the configuration files. This was hiding many bugs introduced by the hexadecimal SSID changes.
Diffstat (limited to 'src')
-rw-r--r--src/config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c
index 6afe7fcf..cd63d407 100644
--- a/src/config.c
+++ b/src/config.c
@@ -68,7 +68,7 @@ static int load_service(GKeyFile *keyfile, struct connman_config *config)
str = g_key_file_get_string(keyfile, "service", "Type", NULL);
if (str != NULL) {
- g_free(service->ssid);
+ g_free(service->type);
service->type = str;
}
@@ -91,7 +91,7 @@ static int load_service(GKeyFile *keyfile, struct connman_config *config)
g_free(hex_ssid);
- g_free(service->type);
+ g_free(service->ssid);
service->ssid = ssid;
service->ssid_len = hex_ssid_len / 2;
}
@@ -415,11 +415,11 @@ int __connman_config_provision_service(struct connman_service *service)
ssid_len == config->service->ssid_len)
if (config->service->ssid &&
memcmp(config->service->ssid, ssid,
- ssid_len) == 0)
+ ssid_len) == 0) {
+ config_service_setup(service, config->service);
break;
+ }
}
- config_service_setup(service, config->service);
-
return 0;
}