2 Nov
2006
2 Nov
'06
7:25 p.m.
On Fri, 2006-10-27 at 21:13 +0200, Hans Morten Kind wrote:
On Thu, Oct 26, 2006 at 01:31:04PM -0700, Dalvenjah FoxFire wrote:
It got a bit weirder with this patch. It no longer crashed, but I got
a different assert error, and a slight (fixable) corruption bug:The patch seems to work here when array_append(&sync_ctx->mails, &mail_ctx->mail, 1); is always called after the new test if (array_is_created(&mail_ctx->mail.keywords)) { } instead of calling array_append() within the new if
hmk
if (array_is_created(&mail_ctx->mail.keywords)) { /* mail's keywords are allocated from a pool that's cleared for each mail. we'll need to copy it to something more permanent. */ ARRAY_CREATE(&keywords_copy, sync_ctx->saved_keywords_pool, unsigned int, array_count(&mail_ctx->mail.keywords)); array_append_array(&keywords_copy, &mail_ctx->mail.keywords); mail_ctx->mail.keywords = keywords_copy;
}array_append(&sync_ctx->mails, &mail_ctx->mail, 1);
- array_append(&sync_ctx->mails, &mail_ctx->mail, 1);
Thanks, I probably would have wasted a long time trying to figure out what the problem was :) Committed.