summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParthasarathi Susarla <sparthasarathi@novell.com>2006-06-13 11:06:14 +0000
committerParthasarathi Susarla <saps@src.gnome.org>2006-06-13 11:06:14 +0000
commitb0818c79dec057671e34dce43bcbbc49b0341203 (patch)
tree00df9aeba95620f3a859f9bbcb6e97d4611de71c
parentb64c4ac9c27cc039be6c62cdf42cdac1ca598ec4 (diff)
downloadevolution-data-server-b0818c79dec057671e34dce43bcbbc49b0341203.tar.gz
Fixes bug #167517 on bnc
2006-06-13 Parthasarathi Susarla <sparthasarathi@novell.com> Fixes bug #167517 on bnc * camel-groupwise-utils.c: (send_as_attachment): revert a part of fejjs patch. We need the message id with the container in it. We cant use the camel_header_msgid_decode method since it would normalise anything after ':'. Henceforth the forwardrequest would get the complete id of the message and the link info is sent correctly. * camel-groupwise-store.c: * camel-groupwise-folder.c: (gw_update_cache): (gw_update_summary): use the hasAttachments element to check if a mail has attachments or not.
-rw-r--r--camel/providers/groupwise/ChangeLog17
-rw-r--r--camel/providers/groupwise/camel-groupwise-folder.c36
-rw-r--r--camel/providers/groupwise/camel-groupwise-store.c3
-rw-r--r--camel/providers/groupwise/camel-groupwise-utils.c12
4 files changed, 36 insertions, 32 deletions
diff --git a/camel/providers/groupwise/ChangeLog b/camel/providers/groupwise/ChangeLog
index 010e59e02..48d75c050 100644
--- a/camel/providers/groupwise/ChangeLog
+++ b/camel/providers/groupwise/ChangeLog
@@ -1,3 +1,20 @@
+2006-06-13 Parthasarathi Susarla <sparthasarathi@novell.com>
+
+ Fixes bug #167517 on bnc
+
+ * camel-groupwise-utils.c: (send_as_attachment):
+ revert a part of fejjs patch. We need the message id
+ with the container in it. We cant use the camel_header_msgid_decode
+ method since it would normalise anything after ':'.
+ Henceforth the forwardrequest would get the complete id of the message
+ and the link info is sent correctly.
+
+ * camel-groupwise-store.c:
+ * camel-groupwise-folder.c:
+ (gw_update_cache):
+ (gw_update_summary): use the hasAttachments element to
+ check if a mail has attachments or not.
+
2006-06-12 Parthasarathi Susarla <sparthasarathi@novell.com>
Fixes bug #166265 on bnc
diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c
index 0daa4ae16..54a40e494 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@ -1166,7 +1166,7 @@ gw_update_cache (CamelFolder *folder, GList *list, CamelException *ex, gboolean
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;
@@ -1219,20 +1219,9 @@ gw_update_cache (CamelFolder *folder, GList *list, CamelException *ex, gboolean
}
mi->server_flags = mi->info.flags;
-
- 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) {
@@ -1430,20 +1419,9 @@ gw_update_summary ( CamelFolder *folder, GList *list,CamelException *ex)
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) {
diff --git a/camel/providers/groupwise/camel-groupwise-store.c b/camel/providers/groupwise/camel-groupwise-store.c
index fc92df3a0..085d93330 100644
--- a/camel/providers/groupwise/camel-groupwise-store.c
+++ b/camel/providers/groupwise/camel-groupwise-store.c
@@ -620,7 +620,7 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
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",
+ "peek id recipient attachments distribution subject status options priority startDate created delivered size hasAttachment",
NULL,
&cursor);
if (status != E_GW_CONNECTION_STATUS_OK) {
@@ -669,7 +669,6 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
camel_operation_end (NULL);
}
-
if (done && all_ok) {
if (summary->time_string)
g_free (summary->time_string);
diff --git a/camel/providers/groupwise/camel-groupwise-utils.c b/camel/providers/groupwise/camel-groupwise-utils.c
index c7370730d..15f76b29f 100644
--- a/camel/providers/groupwise/camel-groupwise-utils.c
+++ b/camel/providers/groupwise/camel-groupwise-utils.c
@@ -345,10 +345,20 @@ send_as_attachment (EGwConnection *cnc, EGwItem *item, CamelStreamMem *content,
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);