[Bug 71384] improve account storage GInterface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 11 03:47:28 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=71384

--- Comment #14 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
"Remove mcp_account_storage_set()"

>   g_hash_table_remove (sa->parameters, parameter);
> - g_hash_table_remove (sa->escaped_parameters, parameter);

No, I think we still need that removal. If a parameter is stored
keyfile-escaped in an existing account, and we change its value (including "to
the same value but with a known type this time"), we should delete the
keyfile-escaped form.

For instance, we might go from

{
  ...
  Parameters = <@a{sv} {}>,
  EscapedParameters = <@a{ss} {'account': 'me at example.com', 'port': '42',
'require-ssl': '1'}>,
}

to

{
  ...
  Parameters = <@a{sv} {'account': <'me at example.com'>, 'port': <uint32 42>,
'require-ssl': <True>}>,
  EscapedParameters = <@a{ss} {}>,
}

+static gboolean
+_set_parameter (McpAccountStorage *self,
+ McpAccountManager *am,
+ const gchar *account,
+ const gchar *parameter,
+ GVariant *val,
+ McpParameterFlags flags)
+{
+ return _set (self, am, account, parameter, val, flags);
+}

To be general and backwards-compatible, this needs to use g_strdup_printf
("param-%s", parameter) as the key.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list