From a3991a36c3260dfaac8860483090ae7ee616b624 Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Mon, 27 Jul 2009 14:06:34 +0800 Subject: [PATCH] Handle phonebook text field with uppercase type --- src/phonebook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phonebook.c b/src/phonebook.c index fac8f89..16d94d2 100644 --- a/src/phonebook.c +++ b/src/phonebook.c @@ -313,7 +313,7 @@ static DBusMessage *generate_export_entries_reply(struct ofono_modem *modem, static gboolean need_merge(const char *text) { int len = strlen(text); - char c = text[len-1]; + char c = tolower(text[len-1]); if ((text[len-2] == '/') && ((c == 'w') || (c == 'h') || (c == 'm') || (c == 'o'))) return TRUE; @@ -333,7 +333,7 @@ static void merge_field_number(GSList **l, const char *number, int type, char c) pn->number = g_strdup(number); pn->type = type; - switch (c) { + switch (tolower(c)) { case 'w': category = TEL_TYPE_WORK; break; -- 2.7.4