diff options
| author | Ross Burton <ross@openedhand.com> | 2006-07-18 11:12:37 +0000 |
|---|---|---|
| committer | Ross Burton <rburton@src.gnome.org> | 2006-07-18 11:12:37 +0000 |
| commit | 1804eef2276a094e10259a59aa21ee74efd13f77 (patch) | |
| tree | 6fa30267e6e07d72ef9594dddc9050ab4cd48de0 | |
| parent | 2b5eb5b865ba453a542dbccee0633f7174f60443 (diff) | |
| download | evolution-data-server-1804eef2276a094e10259a59aa21ee74efd13f77.tar.gz | |
Finish up fixing for new API (#313533).
2006-07-18 Ross Burton <ross@openedhand.com>
* backends/ldap/e-book-backend-ldap.c:
Finish up fixing for new API (#313533).
| -rw-r--r-- | addressbook/ChangeLog | 7 | ||||
| -rw-r--r-- | addressbook/backends/ldap/e-book-backend-ldap.c | 16 |
2 files changed, 19 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index fc335823a..9c8e7e839 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,4 +1,9 @@ -2006-07-17 Sushma Rai <rsushma@openedhand.com> +2006-07-18 Ross Burton <ross@openedhand.com> + + * backends/ldap/e-book-backend-ldap.c: + Finish up fixing for new API (#313533). + +2006-07-17 Sushma Rai <rsushma@novell.com> backends/ldap/e-book-backend-ldap.c: Incorporating the EContactPhoto Changes, so that e-d-s build doesn't break. See #313533. diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c index c9496fd44..1499db001 100644 --- a/addressbook/backends/ldap/e-book-backend-ldap.c +++ b/addressbook/backends/ldap/e-book-backend-ldap.c @@ -3139,6 +3139,8 @@ photo_populate (EContact *contact, struct berval **ber_values) { if (ber_values && ber_values[0]) { EContactPhoto photo; + photo.type = E_CONTACT_PHOTO_TYPE_INLINED; + photo.data.inlined.mime_type = NULL; photo.data.inlined.data = ber_values[0]->bv_val; photo.data.inlined.length = ber_values[0]->bv_len; @@ -3153,7 +3155,7 @@ photo_ber (EContact *contact) EContactPhoto *photo; photo = e_contact_get(contact, E_CONTACT_PHOTO); - if (photo) { + if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) { result = g_new(struct berval *, 2); result[0] = g_new(struct berval, 1); @@ -3179,8 +3181,16 @@ photo_compare(EContact * ecard1, EContact * ecard2) if (photo1 && photo2) { - equal = ((photo1->data.inlined.length == photo2->data.inlined.length) - && !memcmp (photo1->data.inlined.data, photo2->data.inlined.data, photo1->data.inlined.length)); + if (photo1->type == photo2->type && photo1->type == E_CONTACT_PHOTO_TYPE_INLINED) { + equal = ((photo1->data.inlined.length == photo2->data.inlined.length) + && !memcmp (photo1->data.inlined.data, photo2->data.inlined.data, photo1->data.inlined.length)); + } else if (photo1->type == photo2->type && photo1->type == E_CONTACT_PHOTO_TYPE_URI) { + + equal = !strcmp (photo1->data.uri, photo2->data.uri); + } else { + equal = FALSE; + } + } else { equal = (!!photo1 == !!photo2); |
