]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
maildir backend parameter parsing changed to use common function
authorSergey Kitov <sergey.kitov@open-xchange.com>
Fri, 19 May 2017 07:49:01 +0000 (10:49 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 14 Jun 2017 12:33:36 +0000 (15:33 +0300)
src/plugins/quota/quota-maildir.c

index 6e9d3f09ce8e41540edc2c310789bcd6b837afd4..8da2e1d40e43ab2d0b7e21575a9fd45d04a6a2e0 100644 (file)
@@ -764,26 +764,7 @@ static struct quota_root *maildir_quota_alloc(void)
 static int maildir_quota_init(struct quota_root *_root, const char *args,
                              const char **error_r)
 {
-       const char *const *tmp;
-
-       if (args == NULL)
-               return 0;
-
-       for (tmp = t_strsplit(args, ":"); *tmp != NULL; tmp++) {
-               if (strcmp(*tmp, "noenforcing") == 0)
-                       _root->no_enforcing = TRUE;
-               else if (strcmp(*tmp, "hidden") == 0)
-                       _root->hidden = TRUE;
-               else if (strcmp(*tmp, "ignoreunlimited") == 0)
-                       _root->disable_unlimited_tracking = TRUE;
-               else if (strncmp(*tmp, "ns=", 3) == 0)
-                       _root->ns_prefix = p_strdup(_root->pool, *tmp + 3);
-               else {
-                       *error_r = t_strdup_printf("Invalid parameter: %s", *tmp);
-                       return -1;
-               }
-       }
-       return 0;
+       return quota_root_default_init(_root, args, error_r);
 }
 
 static void maildir_quota_deinit(struct quota_root *_root)