After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751044 - addressbook: Treat an empty vCard attribute group name as NULL
addressbook: Treat an empty vCard attribute group name as NULL
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
unspecified
Other All
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2015-06-16 13:30 UTC by Philip Withnall
Modified: 2015-06-18 22:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
addressbook: Treat an empty vCard attribute group name as NULL (2.93 KB, patch)
2015-06-16 13:30 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2015-06-16 13:30:41 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2015-06-16 13:30:45 UTC
Created attachment 305388 [details] [review]
addressbook: Treat an empty vCard attribute group name as NULL

We do not want the following two calls to behave differently:
   e_vcard_attribute_new ("", "X-HELLO")
   e_vcard_attribute_new (NULL, "X-HELLO")

Elsewhere in the vCard code, attribute group names are guaranteed to be
NULL or non-empty strings, so we should follow that precedent here.
Comment 2 Milan Crha 2015-06-18 17:33:25 UTC
Review of attachment 305388 [details] [review]:

Looks fine, please ocmmit to master and gnome-3-16. Thanks.

::: addressbook/libebook-contacts/e-vcard.c
@@ +1544,3 @@
 	attr = g_slice_new0 (EVCardAttribute);
 
+	if (attr_group != NULL && *attr_group == '\0')

can even be: (attr_group && !*attr_group), but that's only a matter of taste
Comment 3 Philip Withnall 2015-06-18 22:28:35 UTC
Comment on attachment 305388 [details] [review]
addressbook: Treat an empty vCard attribute group name as NULL

Attachment 305388 [details] pushed as 513ac76 - addressbook: Treat an empty vCard attribute group name as NULL
Comment 4 Philip Withnall 2015-06-18 22:30:11 UTC
Attachment 305388 [details] pushed to gnome-3-16 as e5cccea - addressbook: Treat an empty vCard attribute group name as NULL