Skip to content

Commit

Permalink
quota: Use doveadm ver2 structures
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Feb 22, 2016
1 parent 7d500ec commit e6e5687
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/plugins/quota/doveadm-quota.c
Expand Up @@ -118,17 +118,31 @@ cmd_quota_recalc_alloc(void)
return ctx;
}

static struct doveadm_mail_cmd quota_commands[] = {
{ cmd_quota_get_alloc, "quota get", NULL },
{ cmd_quota_recalc_alloc, "quota recalc", NULL }
static struct doveadm_cmd_ver2 quota_commands[] = {
{
.name = "quota get",
.usage = "",
.mail_cmd = cmd_quota_get_alloc,
DOVEADM_CMD_PARAMS_START
DOVEADM_CMD_MAIL_COMMON
DOVEADM_CMD_PARAMS_END
},
{
.name = "quota recalc",
.usage = "",
.mail_cmd = cmd_quota_recalc_alloc,
DOVEADM_CMD_PARAMS_START
DOVEADM_CMD_MAIL_COMMON
DOVEADM_CMD_PARAMS_END
}
};

void doveadm_quota_plugin_init(struct module *module ATTR_UNUSED)
{
unsigned int i;

for (i = 0; i < N_ELEMENTS(quota_commands); i++)
doveadm_mail_register_cmd(&quota_commands[i]);
doveadm_cmd_register_ver2(&quota_commands[i]);
}

void doveadm_quota_plugin_deinit(void)
Expand Down

0 comments on commit e6e5687

Please sign in to comment.