aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);