From 7539d6182295bfcaff921a4050a04980d109954c Mon Sep 17 00:00:00 2001 From: Travis Reitter Date: Wed, 9 Nov 2011 16:34:22 -0800 Subject: [PATCH] Properly serialize AFD values for the Tp cache. We were previously writing serialized Telepathy AbstractFieldDetails values over each other in the final array, which was generally bad and specifically crashed Gnome Shell. This affects AFD-derived structures: phone numbers, email addresses, and URLs. Closes: bgo#662314 - Gnome-shell restarts if I change my user status to disconnected/unavailable --- NEWS | 2 ++ backends/telepathy/lib/tpf-persona-store-cache.vala | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index fa24e5f..1c51c3a 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ Bugs fixed: * Bug 662616 — We should set mime type when setting an EContact's photo * Bug 662274 — Failed to link personas: Can't link personas with no primary store. +* Bug 662314 — Gnome-shell restarts if I change my user status to + disconnected/unavailable API changes: * Add AbstractFieldDetails.id to identify instances of details diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala index 150fe5f..352a5f5 100644 --- a/backends/telepathy/lib/tpf-persona-store-cache.vala +++ b/backends/telepathy/lib/tpf-persona-store-cache.vala @@ -147,14 +147,14 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache { foreach (var val in afd.parameters.get (key)) { - parameters[f] = new Variant.tuple ({ + parameters[f++] = new Variant.tuple ({ new Variant.string (key), // Key new Variant.string (val) // Value }); } } - output_variants[i] = new Variant.tuple ({ + output_variants[i++] = new Variant.tuple ({ afd.value, // Variant value (e.g. e-mail address) new Variant.array (new VariantType.tuple ({ VariantType.STRING, // Key -- 2.7.4