diff options
author | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2010-09-13 21:26:44 +0100 |
---|---|---|
committer | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2010-09-13 21:50:31 +0100 |
commit | 42f48a6d53390dd7ef798b637ff7ef5af9c13a65 (patch) | |
tree | 9ada0957d6f2cd3ec93a0007c48cc49f59b96a31 | |
parent | 18504cb01f8403ffcc904773d77a2731eb32b895 (diff) | |
download | telepathy-mission-control-42f48a6d53390dd7ef798b637ff7ef5af9c13a65.tar.gz |
The McdStorage layer uses get/set _value, the actual plugins need to use _string
This way the layer closest to actual storage in a real actually-on-disc
keyfile make sure escaping is handled, while all layers above them can
simply treat the values as "data" without caring how or where they
are stored.
-rw-r--r-- | src/mcd-account-manager-default.c | 10 | ||||
-rw-r--r-- | test/twisted/mcp-account-diversion.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c index 7cfdd2aa..2c130954 100644 --- a/src/mcd-account-manager-default.c +++ b/src/mcd-account-manager-default.c @@ -409,7 +409,7 @@ _set (const McpAccountStorage *self, if (mcp_account_manager_parameter_is_secret (am, account, key)) g_key_file_set_value (amd->secrets, account, key, val); else - g_key_file_set_value (amd->keyfile, account, key, val); + g_key_file_set_string (amd->keyfile, account, key, val); /* if we removed the account before, it now exists again, so... */ g_hash_table_remove (amd->removed_accounts, account); @@ -418,7 +418,7 @@ _set (const McpAccountStorage *self, g_key_file_remove_key (amd->removed, account, key, NULL); #else - g_key_file_set_value (amd->keyfile, account, key, val); + g_key_file_set_string (amd->keyfile, account, key, val); #endif @@ -443,9 +443,9 @@ _get (const McpAccountStorage *self, /* fall back to public source if secret was not in keyring */ if (v == NULL) - v = g_key_file_get_value (amd->keyfile, account, key, NULL); + v = g_key_file_get_string (amd->keyfile, account, key, NULL); #else - v = g_key_file_get_value (amd->keyfile, account, key, NULL); + v = g_key_file_get_string (amd->keyfile, account, key, NULL); #endif if (v == NULL) @@ -465,7 +465,7 @@ _get (const McpAccountStorage *self, for (i = 0; i < n; i++) { - gchar *v = g_key_file_get_value (amd->keyfile, account, keys[i], NULL); + gchar *v = g_key_file_get_string (amd->keyfile, account, keys[i], NULL); if (v != NULL) mcp_account_manager_set_value (am, account, keys[i], v); diff --git a/test/twisted/mcp-account-diversion.c b/test/twisted/mcp-account-diversion.c index 011f6e4b..67d6a688 100644 --- a/test/twisted/mcp-account-diversion.c +++ b/test/twisted/mcp-account-diversion.c @@ -118,7 +118,7 @@ _set (const McpAccountStorage *self, AccountDiversionPlugin *adp = ACCOUNT_DIVERSION_PLUGIN (self); adp->save = TRUE; - g_key_file_set_value (adp->keyfile, account, key, val); + g_key_file_set_string (adp->keyfile, account, key, val); return TRUE; } @@ -133,7 +133,7 @@ _get (const McpAccountStorage *self, if (key != NULL) { - gchar *v = g_key_file_get_value (adp->keyfile, account, key, NULL); + gchar *v = g_key_file_get_string (adp->keyfile, account, key, NULL); if (v == NULL) return FALSE; @@ -152,7 +152,7 @@ _get (const McpAccountStorage *self, for (i = 0; i < n; i++) { - gchar *v = g_key_file_get_value (adp->keyfile, account, keys[i], NULL); + gchar *v = g_key_file_get_string (adp->keyfile, account, keys[i], NULL); if (v != NULL) mcp_account_manager_set_value (am, account, keys[i], v); |