aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-17 05:27:59 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-17 05:27:59 +0800
commit66da172519ba60805e7b07f194ce6a147fcdb905 (patch)
tree06052595cf27772d52f0013c42ba162a24e61b77
parent1ff31661d88adcc062630f760535146f2281209d (diff)
downloadgsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.gz
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.bz2
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.lz
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.xz
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.tar.zst
gsoc2013-evolution-66da172519ba60805e7b07f194ce6a147fcdb905.zip
If card->id is NULL, return an empty string. (e_card_set_id): Don't allow
2001-10-16 Jon Trowbridge <trow@ximian.com> * backend/ebook/e-card.c (e_card_get_id): If card->id is NULL, return an empty string. (e_card_set_id): Don't allow the card id to be set to NULL; use the empty string instead. (e_card_get_vobject): When building our vcard, pass in the empty string as the id if card->id is NULL. (Bug #10164) svn path=/trunk/; revision=13705
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/backend/ebook/e-card.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8d49925287..325a934e6c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-16 Jon Trowbridge <trow@ximian.com>
+
+ * backend/ebook/e-card.c (e_card_get_id): If card->id is NULL,
+ return an empty string.
+ (e_card_set_id): Don't allow the card id to be set to NULL; use
+ the empty string instead.
+ (e_card_get_vobject): When building our vcard, pass in the empty
+ string as the id if card->id is NULL. (Bug #10164)
+
2001-10-16 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c (local_record_from_ecard): don't set
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 38116891b5..47dfdb2880 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -326,7 +326,7 @@ e_card_get_id (ECard *card)
{
g_return_val_if_fail (card && E_IS_CARD (card), NULL);
- return card->id;
+ return card->id ? card->id : "";
}
/**
@@ -344,7 +344,7 @@ e_card_set_id (ECard *card, const char *id)
if ( card->id )
g_free(card->id);
- card->id = g_strdup(id);
+ card->id = g_strdup(id ? id : "");
}
EBook *
@@ -729,7 +729,7 @@ e_card_get_vobject (ECard *card, gboolean assumeUTF8)
}
}
- ADD_PROP_VALUE (vobj, VCUniqueStringProp, card->id);
+ ADD_PROP_VALUE (vobj, VCUniqueStringProp, card->id ? card->id : "");
#if 0
if (crd->photo.prop.used) {