projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3da64a1
)
Code review fix: check return value of e_book_add_contact
author
Jose Dapena Paz
<jdapena@igalia.com>
Tue, 31 Mar 2009 11:56:57 +0000
(11:56 +0000)
committer
Jose Dapena Paz
<jdapena@igalia.com>
Tue, 31 Mar 2009 11:56:57 +0000
(11:56 +0000)
pmo-trunk-r8486
src/hildon2/modest-address-book.c
patch
|
blob
|
history
diff --git
a/src/hildon2/modest-address-book.c
b/src/hildon2/modest-address-book.c
index
6964ed3
..
48dc31a
100644
(file)
--- a/
src/hildon2/modest-address-book.c
+++ b/
src/hildon2/modest-address-book.c
@@
-445,10
+445,18
@@
commit_contact(EContact * contact, gboolean is_new)
if (OSSO_ABOOK_IS_CONTACT (contact)) {
osso_abook_contact_commit(OSSO_ABOOK_CONTACT(contact), is_new, book, NULL);
} else {
if (OSSO_ABOOK_IS_CONTACT (contact)) {
osso_abook_contact_commit(OSSO_ABOOK_CONTACT(contact), is_new, book, NULL);
} else {
- if (is_new)
- e_book_add_contact (book, contact, NULL);
- else
- e_book_commit_contact (book, contact, NULL);
+ GError *err = NULL;
+ if (is_new) {
+ if (!e_book_add_contact (book, contact, &err)) {
+ g_warning ("Failed to add contact: %s", err->message);
+ g_error_free (err);
+ }
+ } else {
+ if (!e_book_commit_contact (book, contact, &err)) {
+ g_warning ("Failed to commit contact: %s", err->message);
+ g_error_free (err);
+ }
+ }
}
#endif /* MODEST_ABOOK_API < 2 */
}
}
#endif /* MODEST_ABOOK_API < 2 */
}