[folks] ofono: Skip whitespace between vCards when splitting them up
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] ofono: Skip whitespace between vCards when splitting them up
- Date: Mon, 21 Oct 2013 16:57:40 +0000 (UTC)
commit f9907524e16a121b7b88ca369b34a7719c510072
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Oct 15 12:27:06 2013 +0100
ofono: Skip whitespace between vCards when splitting them up
This eliminates the following libebook warning which we were triggering.
libebook itself skips the whitespace, so this introduces no functional
changes.
libebook-contacts-WARNING **: vcard began without a BEGIN:VCARD
https://bugzilla.gnome.org/show_bug.cgi?id=710178
NEWS | 1 +
backends/ofono/ofono-persona-store.vala | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 31ee873..6ec3551 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Bugs fixed:
• Bug 679826 — Investigate using parallel-tests to speed up testing
• Bug 709674 — Ignore non-phonebook-enabled modems in ofono backend
• Bug 697209 — Individual: connect to Persona::notify less enthusiastically
+• Bug 710178 — Skip whitespace between oFono vCards
API changes:
diff --git a/backends/ofono/ofono-persona-store.vala b/backends/ofono/ofono-persona-store.vala
index 4cd339d..f649886 100644
--- a/backends/ofono/ofono-persona-store.vala
+++ b/backends/ofono/ofono-persona-store.vala
@@ -170,6 +170,10 @@ public class Folks.Backends.Ofono.PersonaStore : Folks.PersonaStore
foreach (string line in lines)
{
+ /* Skip whitespace between vCards. */
+ if (vcard == "" && line.strip () == "")
+ continue;
+
vcard += line;
vcard += "\n";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]