aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-31 08:00:16 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-31 08:00:16 +0800
commit74ae9178ab9e025463dd1d167282a0de65389a24 (patch)
treeb9320b1455450543259b8a539037cbdec159e153
parent81407e740577c28490e2b7a74cddd8eb8b83cbb3 (diff)
downloadgsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar.gz
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar.bz2
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar.lz
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar.xz
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.tar.zst
gsoc2013-evolution-74ae9178ab9e025463dd1d167282a0de65389a24.zip
Free the response before checking for errors. I'm not sure this'll
2002-05-30 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Free the response before checking for errors. I'm not sure this'll actually fix the memory leak here, but it might? Certainly can't hurt. * camel-block-file.c (camel_block_file_finalise): Destroy the blocks hash table. svn path=/trunk/; revision=17053
-rw-r--r--camel/ChangeLog11
-rw-r--r--camel/camel-block-file.c4
-rw-r--r--camel/providers/imap/camel-imap-folder.c37
3 files changed, 45 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 4a8cf3d0ae..432aaa4ad7 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/imap/camel-imap-folder.c (imap_rescan): Free the
+ response before checking for errors. I'm not sure this'll actually
+ fix the memory leak here, but it might? Certainly can't hurt.
+
+ * camel-block-file.c (camel_block_file_finalise): Destroy the
+ blocks hash table.
+
2002-05-29 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (connect_to_server): Only free
@@ -37,7 +46,6 @@
code using CamelRemoteStore.
(camel_nntp_command): Don't call camel_remote_store_connected().
->>>>>>> 1.1492
2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-folder.c (content_info_get_part_spec):
@@ -64,7 +72,6 @@
* providers/imap/camel-imap-store.c (connect_to_server): Added
some NULL protection fixes.
->>>>>>> 1.1491
2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
* camel-remote-store.c: Removed from the build. Glory glory
diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c
index 1ec1f74061..bc485dd6e5 100644
--- a/camel/camel-block-file.c
+++ b/camel/camel-block-file.c
@@ -228,7 +228,9 @@ camel_block_file_finalise(CamelBlockFile *bs)
bl = bn;
bn = bn->next;
}
-
+
+ g_hash_table_destroy (bs->blocks);
+
if (bs->root_block)
camel_block_file_unref_block(bs, bs->root_block);
g_free(bs->path);
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 0b9f785d21..e798dcbebf 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -56,6 +56,7 @@
#include "camel-mime-message.h"
#include "camel-mime-utils.h"
#include "camel-multipart.h"
+#include "camel-multipart-signed.h"
#include "camel-operation.h"
#include "camel-session.h"
#include "camel-stream-buffer.h"
@@ -512,6 +513,9 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
g_datalist_clear (&data);
}
+ /* Free the final tagged response */
+ g_free (resp);
+
camel_operation_end (NULL);
if (type == CAMEL_IMAP_RESPONSE_ERROR) {
for (i = 0; i < summary_len && new[i].uid; i++)
@@ -519,8 +523,6 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
g_free (new);
return;
}
- /* Free the final tagged response */
- g_free (resp);
/* If we find a UID in the summary that doesn't correspond to
* the UID in the folder, then either: (a) it's a real UID,
@@ -1574,8 +1576,35 @@ get_content (CamelImapFolder *imap_folder, const char *uid,
part_spec = content_info_get_part_spec (ci);
- /* There are three cases: multipart, message/rfc822, and "other" */
- if (header_content_type_is (ci->type, "multipart", "*")) {
+ /* There are three cases: multipart/signed, multipart, message/rfc822, and "other" */
+ if (header_content_type_is(ci->type, "multipart", "signed")) {
+ CamelMultipartSigned *body_mp;
+ char *spec;
+ int ret;
+
+ /* Note: because we get the content parts uninterpreted anyway, we could potentially
+ just use the normalmultipart code, except that multipart/signed wont let you yet! */
+
+ body_mp = camel_multipart_signed_new();
+ /* need to set this so it grabs the boundary and other info about the signed type */
+ /* we assume that part->content_type is more accurate/full than ci->type */
+ camel_data_wrapper_set_mime_type_field(CAMEL_DATA_WRAPPER(body_mp), part->content_type);
+
+ spec = alloca(strlen(part_spec) + 6);
+ sprintf(spec, part_spec[0]?"%s.TEXT":"TEXT", part_spec);
+
+ stream = camel_imap_folder_fetch_data (imap_folder, uid, spec, FALSE, ex);
+ if (stream) {
+ ret = camel_data_wrapper_construct_from_stream(CAMEL_DATA_WRAPPER(body_mp), stream);
+ camel_object_unref(CAMEL_OBJECT(stream));
+ if (ret == -1) {
+ camel_object_unref((CamelObject *)body_mp);
+ return NULL;
+ }
+ }
+
+ return (CamelDataWrapper *)body_mp;
+ } else if (header_content_type_is (ci->type, "multipart", "*")) {
CamelMultipart *body_mp;
char *child_spec;
int speclen, num;