From b1d0bda4b3684a619855b3e3cf60c484cddf6d68 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 12 Aug 2009 19:37:39 -0500 Subject: Always output useable FN in VCard If text is NULL or empty, use the number field for the FN VCard entry instead. --- src/phonebook.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/phonebook.c b/src/phonebook.c index 6a1a3c54..8afb2f0d 100644 --- a/src/phonebook.c +++ b/src/phonebook.c @@ -417,7 +417,12 @@ void ofono_phonebook_entry(struct ofono_modem *modem, int index, } vcard_printf_begin(phonebook->vcards); - vcard_printf_text(phonebook->vcards, text); + + if (text == NULL || text[0] == '\0') + vcard_printf_text(phonebook->vcards, number); + else + vcard_printf_text(phonebook->vcards, text); + vcard_printf_number(phonebook->vcards, number, type, TEL_TYPE_OTHER); vcard_printf_number(phonebook->vcards, adnumber, adtype, TEL_TYPE_OTHER); -- cgit v1.2.3