aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-03-21 04:11:13 +0800
committerIain Holmes <iain@src.gnome.org>2001-03-21 04:11:13 +0800
commit04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c (patch)
tree3e97167197ae71998c7d681a84159154f55f3dc5 /mail
parent999db03eb84cac0dc1aaa1dc9387268330d56994 (diff)
downloadgsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.gz
gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.zst
gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.zip
Step the parser so it imports more than one message.
svn path=/trunk/; revision=8854
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/importers/evolution-mbox-importer.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d06e00beb6..30a866dcf3 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-20 Iain Holmes <iain@ximian.com>
+
+ * importers/evolution-mbox-importer.c (process_item_fn): Step the parser
+ so that it will import more than one message.
+
2001-03-20 JP Rosevear <jpr@ximian.com>
* importers/Makefile.am: extra dist the oaf files
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 241055cb10..b39691f0dc 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -38,6 +38,17 @@
#include <camel/camel-exception.h>
#include <camel/camel-mime-parser.h>
#include <camel/camel-mime-part.h>
+#include <camel/camel-mime-message.h>
+#include "mail-tools.h"
+
+#define IMPORTER_DEBUG
+#ifdef IMPORTER_DEBUG
+#define IN g_print ("=====> %s (%d)\n", __FUNCTION__, __LINE__)
+#define OUT g_print ("<==== %s (%d)\n", __FUNCTION__, __LINE__)
+#else
+#define IN
+#define OUT
+#endif
#define MBOX_FACTORY_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"
@@ -49,6 +60,7 @@ typedef struct {
CamelMimeParser *mp;
} MboxImporter;
+void mail_importer_module_init (void);
/* EvolutionImporter methods */
@@ -69,6 +81,7 @@ process_item_fn (EvolutionImporter *eimporter,
CamelMimeMessage *msg;
CamelMessageInfo *info;
+ IN;
msg = camel_mime_message_new ();
if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg),
mbi->mp) == -1) {
@@ -86,12 +99,19 @@ process_item_fn (EvolutionImporter *eimporter,
g_warning ("Failed message %d", mbi->num);
done = TRUE;
}
+ OUT;
} else {
+ IN;
/* all messages have now been imported */
camel_folder_sync (importer->folder, FALSE, ex);
camel_folder_thaw (importer->folder);
importer->frozen = FALSE;
done = TRUE;
+ OUT;
+ }
+
+ if (!done) {
+ camel_mime_parser_step (mbi->mp, 0, 0);
}
camel_exception_free (ex);