if (val > 0)
network->priority = val;
- g_free(network->wifi.security);
- network->wifi.security = g_key_file_get_string(keyfile,
+ if (network->remember == TRUE) {
+ g_free(network->wifi.security);
+ network->wifi.security = g_key_file_get_string(keyfile,
network->identifier, "WiFi.Security", NULL);
- g_free(network->wifi.passphrase);
- network->wifi.passphrase = g_key_file_get_string(keyfile,
+ g_free(network->wifi.passphrase);
+ network->wifi.passphrase = g_key_file_get_string(keyfile,
network->identifier, "WiFi.Passphrase", NULL);
+ }
g_key_file_free(keyfile);
g_key_file_set_integer(keyfile, network->identifier,
"Priority", network->priority);
- if (network->wifi.security != NULL)
- g_key_file_set_string(keyfile, network->identifier,
+ if (network->remember == TRUE) {
+ if (network->wifi.security != NULL)
+ g_key_file_set_string(keyfile, network->identifier,
"WiFi.Security", network->wifi.security);
- if (network->wifi.passphrase != NULL)
- g_key_file_set_string(keyfile, network->identifier,
+ if (network->wifi.passphrase != NULL)
+ g_key_file_set_string(keyfile, network->identifier,
"WiFi.Passphrase", network->wifi.passphrase);
+ }
data = g_key_file_to_data(keyfile, &length, NULL);