Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
evolution-data-server
bnc-464758-add-dummy-string.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-464758-add-dummy-string.patch of Package evolution-data-server
--- camel/providers/groupwise/camel-groupwise-folder.c 2009/01/27 08:42:34 9970 +++ camel/providers/groupwise/camel-groupwise-folder.c 2009/01/27 08:50:19 9971 @@ -536,6 +536,7 @@ update_junk_list (CamelStore *store, CamelMessageInfo *info, int flag) { gchar **email = NULL, *from = NULL; + int index = 0; CamelGroupwiseStore *gw_store= CAMEL_GROUPWISE_STORE(store); CamelGroupwiseStorePrivate *priv = gw_store->priv; EGwConnection *cnc = cnc_lookup (priv); @@ -545,18 +546,25 @@ email = g_strsplit_set (from, "<>", -1); - if (!email || !email[1]) + if (from [0] == '<') { + /* g_strsplit_set will add a dummy empty string as the first string if the first character in the + original string is one of the delimiters that you want to suppress. + Refer to g_strsplit_set documentation */ + index = 1; + } + + if (!email || !email[index]) goto error; if (flag == ADD_JUNK_ENTRY) - e_gw_connection_create_junk_entry (cnc, email[1], "email", "junk"); + e_gw_connection_create_junk_entry (cnc, email[index], "email", "junk"); else if (flag == REMOVE_JUNK_ENTRY) { GList *list = NULL; EGwJunkEntry *entry; if (e_gw_connection_get_junk_entries (cnc, &list)== E_GW_CONNECTION_STATUS_OK){ while (list) { entry = list->data; - if (!g_ascii_strcasecmp (entry->match, email[1])) { + if (!g_ascii_strcasecmp (entry->match, email[index])) { e_gw_connection_remove_junk_entry (cnc, entry->id); } list = list->next;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor