[evolution-ews] Bug #661528 - g_ascii_strcasecmp: assertion `s2 != NULL' failed
- From: Vibha Yadav <yvibha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #661528 - g_ascii_strcasecmp: assertion `s2 != NULL' failed
- Date: Fri, 18 Nov 2011 06:34:06 +0000 (UTC)
commit 78cc513a9035362935caca8065f456d7d29f7901
Author: Vibha Yadav <yvibha novell com>
Date: Fri Nov 18 12:02:17 2011 +0530
Bug #661528 - g_ascii_strcasecmp: assertion `s2 != NULL' failed
Added a check for NULL String before calling to compare.
src/addressbook/e-book-backend-ews.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index b3f746b..dc8f572 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -1026,16 +1026,14 @@ convert_contact_to_updatexml (ESoapMessage *msg, gpointer user_data)
if (element_type == ELEMENT_TYPE_SIMPLE) {
value = e_contact_get (new_contact, mappings[i].field_id);
old_value = e_contact_get (old_contact, mappings[i].field_id);
+ if ((value && !old_value) || (!value && old_value) ||(value && old_value && g_ascii_strcasecmp(value, old_value)))
+ convert_contact_property_to_updatexml(msg, mappings[i].element_name, value, "contacts", NULL, NULL);
if (value)
- {
- if(( *value && !old_value) || g_ascii_strcasecmp (value, old_value))
- convert_contact_property_to_updatexml(msg, mappings[i].element_name, value, "contacts", NULL, NULL);
g_free(value);
- }
- if(old_value)
+ if (old_value)
g_free(old_value);
} else if (element_type == ELEMENT_TYPE_COMPLEX) {
- if(mappings [i].field_id == E_CONTACT_UID)
+ if (mappings [i].field_id == E_CONTACT_UID)
continue;
mappings[i].set_changes (msg, new_contact, old_contact);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]