struct mailbox_cache_field *cf;
unsigned int i, count;
- if (box->metadata_pool == NULL) {
- box->metadata_pool =
- pool_alloconly_create("mailbox metadata", 1024*3);
- }
-
fields = mail_cache_register_get_list(box->cache,
- box->metadata_pool, &count);
+ pool_datastack_create(), &count);
- cache_fields = p_new(box->metadata_pool,
- ARRAY_TYPE(mailbox_cache_field), 1);
- p_array_init(cache_fields, box->metadata_pool, count);
+ cache_fields = t_new(ARRAY_TYPE(mailbox_cache_field), 1);
+ t_array_init(cache_fields, count);
for (i = 0; i < count; i++) {
dec = fields[i].decision & ~MAIL_CACHE_DECISION_FORCED;
if (dec != MAIL_CACHE_DECISION_NO) {
/* virtual mailboxes: */
const struct virtual_mailbox_vfuncs *virtual_vfuncs;
/* private: */
- pool_t pool, metadata_pool;
+ pool_t pool;
/* Linked list of all mailboxes in this storage */
struct mailbox *prev, *next;
DLLIST_REMOVE(&box->storage->mailboxes, box);
mail_storage_obj_unref(box->storage);
- pool_unref(&box->metadata_pool);
pool_unref(&box->pool);
}
if (mailbox_verify_existing_name(box) < 0)
return -1;
- if (box->metadata_pool != NULL)
- p_clear(box->metadata_pool);
-
if (box->v.get_metadata(box, items, metadata_r) < 0)
return -1;