X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Ftechnology.c;h=672d6ea81990bc966908bc6e4f4a7b7469abb11c;hb=f89b473dfd8e916314b534b3397442f8c869c783;hp=4e053fc9caa9c49880122777ef61b739db1fab77;hpb=dd3cccc5e67548dcc2dd6c6254ed6c97859085d5;p=platform%2Fupstream%2Fconnman.git diff --git a/src/technology.c b/src/technology.c index 4e053fc..672d6ea 100644 --- a/src/technology.c +++ b/src/technology.c @@ -185,10 +185,12 @@ static void technology_save(struct connman_technology *technology) "Tethering.Identifier", technology->tethering_ident); - if (technology->tethering_passphrase) + if (technology->tethering_passphrase) { + char *enc = g_strescape(technology->tethering_passphrase, NULL); g_key_file_set_string(keyfile, identifier, - "Tethering.Passphrase", - technology->tethering_passphrase); + "Tethering.Passphrase", enc); + g_free(enc); + } done: g_free(identifier); @@ -390,6 +392,7 @@ static void technology_load(struct connman_technology *technology) gchar *identifier; GError *error = NULL; bool enable, need_saving = false; + char *enc; DBG("technology %p", technology); @@ -436,8 +439,10 @@ static void technology_load(struct connman_technology *technology) technology->tethering_ident = g_key_file_get_string(keyfile, identifier, "Tethering.Identifier", NULL); - technology->tethering_passphrase = g_key_file_get_string(keyfile, + enc = g_key_file_get_string(keyfile, identifier, "Tethering.Passphrase", NULL); + if (enc) + technology->tethering_passphrase = g_strcompress(enc); done: g_free(identifier);