Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jberkman
evolution-data-server-2.6
bnc-167517-corrupted-attachment-gw.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-167517-corrupted-attachment-gw.patch of Package evolution-data-server-2.6
--- camel/providers/groupwise/camel-groupwise-folder.c 2006-07-25 08:25:11.220890928 +0530 +++ camel/providers/groupwise/camel-groupwise-folder.c 2006-07-25 08:16:52.331733608 +0530 @@ -1182,7 +1182,7 @@ gw_update_cache (CamelFolder *folder, GL camel_operation_progress (NULL, (100*i)/total_items); - status = e_gw_connection_get_item (cnc, container_id, id, "peek default distribution recipient message attachments subject notification created recipientStatus status size", &item); + status = e_gw_connection_get_item (cnc, container_id, id, "peek default distribution recipient message attachments subject notification created recipientStatus status hasAttachment size", &item); if (status != E_GW_CONNECTION_STATUS_OK) { i++; continue; @@ -1234,19 +1234,8 @@ gw_update_cache (CamelFolder *folder, GL mi->info.flags |= CAMEL_MESSAGE_FLAGGED; } - attach_list = e_gw_item_get_attach_id_list (item); - if (attach_list) { - GSList *al = attach_list; - gboolean has_attachments = TRUE; - EGwItemAttachment *attach = (EGwItemAttachment *)al->data; - - if (!g_ascii_strcasecmp (attach->name, "Mime.822") || - !g_ascii_strcasecmp (attach->name, "TEXT.htm")) - has_attachments = FALSE; - - if (has_attachments) - mi->info.flags |= CAMEL_MESSAGE_ATTACHMENTS; - } + if (e_gw_item_has_attachment (item)) + mi->info.flags |= CAMEL_MESSAGE_ATTACHMENTS; org = e_gw_item_get_organizer (item); if (org) { @@ -1444,20 +1433,9 @@ gw_update_summary ( CamelFolder *folder, if (priority && !(g_ascii_strcasecmp (priority,"High"))) { mi->info.flags |= CAMEL_MESSAGE_FLAGGED; } - - attach_list = e_gw_item_get_attach_id_list (item); - if (attach_list) { - GSList *al = attach_list; - gboolean has_attachments = TRUE; - EGwItemAttachment *attach = (EGwItemAttachment *)al->data; - - if (!g_ascii_strcasecmp (attach->name, "Mime.822") || - !g_ascii_strcasecmp (attach->name, "TEXT.htm")) - has_attachments = FALSE; - - if (has_attachments) - mi->info.flags |= CAMEL_MESSAGE_ATTACHMENTS; - } + + if (e_gw_item_has_attachment (item)) + mi->info.flags |= CAMEL_MESSAGE_ATTACHMENTS; org = e_gw_item_get_organizer (item); if (org) { --- camel/providers/groupwise/camel-groupwise-store.c 2006-07-25 08:25:11.024920720 +0530 +++ camel/providers/groupwise/camel-groupwise-store.c 2006-07-25 08:19:12.835373808 +0530 @@ -620,8 +620,8 @@ groupwise_get_folder (CamelStore *store, d(g_print ("\n\n** %s **: No summary as yet : using get cursor request\n\n", folder->name);) status = e_gw_connection_create_cursor (priv->cnc, container_id, - "peek id recipient attachments distribution subject status options priority startDate created delivered size", NULL, + "peek id recipient attachments distribution subject status options priority startDate created delivered size hasAttachment", &cursor); if (status != E_GW_CONNECTION_STATUS_OK) { CAMEL_SERVICE_UNLOCK (gw_store, connect_lock); --- camel/providers/groupwise/camel-groupwise-utils.c 2006-07-25 08:25:11.099909320 +0530 +++ camel/providers/groupwise/camel-groupwise-utils.c 2006-07-25 08:11:47.927010160 +0530 @@ -345,10 +345,20 @@ send_as_attachment (EGwConnection *cnc, if (camel_content_type_is (type, "message", "rfc822")) { const char *message_id; char *msgid; + int len; message_id = camel_medium_get_header (CAMEL_MEDIUM (dw), "Message-Id"); - msgid = camel_header_msgid_decode (message_id); + /* + * XXX: The following code piece is a screwed up way of doing stuff. + * But we dont have much choice. Do not use 'camel_header_msgid_decode' + * since it removes the container id portion from the id and which the + * groupwise server needs. + */ + len = strlen (message_id); + msgid = (char *)g_malloc0 (len-1); + msgid = memcpy(msgid, message_id+2, len-3); + status = e_gw_connection_forward_item (cnc, msgid, NULL, TRUE, &temp_item); g_free (msgid); Index: servers/groupwise/e-gw-item.c =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v retrieving revision 1.100 diff -u -p -r1.100 e-gw-item.c --- servers/groupwise/e-gw-item.c 13 Jun 2006 07:15:37 -0000 1.100 +++ servers/groupwise/e-gw-item.c 13 Jun 2006 10:54:23 -0000 @@ -72,6 +72,7 @@ struct _EGwItemPrivate { char *msg_body_id; int item_status; /*Attachments*/ + gboolean has_attachment; GSList *attach_list ; /*linkInfo for replies*/ EGwItemLinkInfo *link_info; @@ -525,6 +526,7 @@ e_gw_item_init (EGwItem *item, EGwItemCl priv->self_status = 0; priv->link_info = NULL; priv->msg_body_id = NULL; + priv->has_attachment = FALSE; item->priv = priv; @@ -1795,6 +1797,9 @@ e_gw_item_new_from_soap_parameter (const } else if (!g_ascii_strcasecmp (name, "size")) { item->priv->size = soup_soap_parameter_get_int_value (child); + } else if (!g_ascii_strcasecmp (name, "hasAttachment")) { + item->priv->has_attachment = soup_soap_parameter_get_int_value (child); + } else if (!g_ascii_strcasecmp (name, "options")) { SoupSoapParameter *subparam; char *value = NULL; @@ -2065,6 +2070,14 @@ e_gw_item_get_mail_size (EGwItem *item) return item->priv->size; } +gboolean +e_gw_item_has_attachment (EGwItem *item) +{ + g_return_val_if_fail (E_IS_GW_ITEM (item), 0); + + return item->priv->has_attachment; +} + char * e_gw_item_get_creation_date (EGwItem *item) { Index: servers/groupwise/e-gw-item.h =================================================================== RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.h,v retrieving revision 1.40 diff -u -p -r1.40 e-gw-item.h --- servers/groupwise/e-gw-item.h 6 Dec 2005 10:05:57 -0000 1.40 +++ servers/groupwise/e-gw-item.h 13 Jun 2006 10:54:23 -0000 @@ -298,6 +298,7 @@ void e_gw_item_set_source (EGwItem *item int e_gw_item_get_trigger (EGwItem *item); void e_gw_item_set_trigger (EGwItem *item, int trigger); +gboolean e_gw_item_has_attachment (EGwItem *item); typedef struct { char *email;
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