static void dsync_brain_sync_msgs(struct dsync_brain *brain)
{
ARRAY_TYPE(dsync_brain_mailbox) mailboxes;
+ pool_t pool;
- t_array_init(&mailboxes, 128);
+ pool = pool_alloconly_create("dsync changed mailboxes", 10240);
+ p_array_init(&mailboxes, pool, 128);
dsync_brain_get_changed_mailboxes(brain, &mailboxes,
(brain->flags & DSYNC_BRAIN_FLAG_FULL_SYNC) != 0);
brain->mailbox_sync = dsync_brain_msg_sync_init(brain, &mailboxes);
dsync_brain_msg_sync_more(brain->mailbox_sync);
+ pool_unref(&pool);
}
static void
iter = i_new(struct proxy_client_dsync_worker_msg_iter, 1);
iter->iter.worker = _worker;
- iter->pool = pool_alloconly_create("proxy message iter", 1024);
+ iter->pool = pool_alloconly_create("proxy message iter", 10240);
- str = t_str_new(512);
+ str = str_new(iter->pool, 512);
str_append(str, "MSG-LIST");
- for (i = 0; i < mailbox_count; i++) {
+ for (i = 0; i < mailbox_count; i++) T_BEGIN {
str_append_c(str, '\t');
dsync_proxy_mailbox_guid_export(str, &mailboxes[i]);
- }
+ } T_END;
str_append_c(str, '\n');
o_stream_send(worker->output, str_data(str), str_len(str));
+ p_clear(iter->pool);
+
proxy_client_worker_output_flush(_worker);
return &iter->iter;
}