diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-03-21 04:11:13 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-03-21 04:11:13 +0800 |
commit | 04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c (patch) | |
tree | 3e97167197ae71998c7d681a84159154f55f3dc5 /mail/importers | |
parent | 999db03eb84cac0dc1aaa1dc9387268330d56994 (diff) | |
download | gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.gz gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.bz2 gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.lz gsoc2013-evolution-04ee7c6788eaeec1b8e7a5b5048b7e9e28b8fa0c.tar.xz 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/importers')
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 20 |
1 files changed, 20 insertions, 0 deletions
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); |