]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Use doveadm ver2 structures
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 22 Feb 2016 12:03:41 +0000 (14:03 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 22 Feb 2016 19:32:30 +0000 (21:32 +0200)
src/plugins/quota/doveadm-quota.c

index 2f08b9362cf4a56e9b6ba7eb442090e8e1525acf..cbf96d4bb8c645b676c66fc73ba41e31ddd4942c 100644 (file)
@@ -118,9 +118,23 @@ 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)
@@ -128,7 +142,7 @@ 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)