quota-count.c revision 63f36c2b47217fc2dc4ed49cfc1907311d5ed366
/* Copyright (c) 2006-2007 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "mail-search.h"
#include "mail-storage.h"
#include "quota-private.h"
{
struct mailbox_transaction_context *trans;
struct mail_search_context *ctx;
struct mail_search_arg search_arg;
int ret = 0;
return -1;
mailbox_close(&box);
return -1;
}
*count_r += 1;
}
if (mailbox_search_deinit(&ctx) < 0)
ret = -1;
if (ret < 0)
else
(void)mailbox_transaction_commit(&trans);
mailbox_close(&box);
return ret;
}
{
struct mailbox_list_iterate_context *ctx;
const struct mailbox_info *info;
int ret = 0;
MAILBOX_NOSELECT)) == 0) {
if (ret < 0)
break;
}
}
if (mailbox_list_iter_deinit(&ctx) < 0)
ret = -1;
return ret;
}
{
struct mail_storage *const *storages;
unsigned int i, count;
int ret = 0;
for (i = 0; i < count; i++) {
if (ret < 0)
break;
}
return ret;
}