From d812ff8534b2c1e1837b04b12660e4d435498b1d Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 12 Aug 2009 19:47:22 -0500 Subject: [PATCH] Warn when (potentially) invalid input encountered --- drivers/atmodem/phonebook.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/atmodem/phonebook.c b/drivers/atmodem/phonebook.c index f9d7da19..6ead98ba 100644 --- a/drivers/atmodem/phonebook.c +++ b/drivers/atmodem/phonebook.c @@ -165,6 +165,16 @@ static void at_cpbr_notify(GAtResult *result, gpointer user_data) char *tel_uri_utf8 = NULL; text_utf8 = ucs2_to_utf8(text); + + if (text_utf8 == NULL) + ofono_warn("Name field conversion to UTF8" + " failed, this can indicate a" + " problem with modem" + " integration, as this field" + " is required by 27.007." + " Contents of name reported" + " by modem: %s", text); + if (group) group_utf8 = ucs2_to_utf8(group); if (secondtext)