From 26a6ff7f0e1e020212c68e97110b0a3a9d2af628 Mon Sep 17 00:00:00 2001 From: Baofeng Wang Date: Wed, 20 Apr 2016 17:27:50 +0300 Subject: [PATCH] config: Remove old_namespace() From config/old-set-parser.c, and its caller. The namespace section named "private", "shared" or "public" is obsolete accordingly. --- src/config/old-set-parser.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index 85c6260390..b8503e7227 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -510,21 +510,6 @@ static bool old_auth_section(struct config_parser_context *ctx, return FALSE; } -static bool old_namespace(struct config_parser_context *ctx, - const char *value) -{ - if (strcmp(value, "private") != 0 && - strcmp(value, "shared") != 0 && - strcmp(value, "public") != 0) - return FALSE; - - obsolete(ctx, "namespace %s {} has been replaced by namespace { type=%s }", value, value); - config_parser_apply_line(ctx, CONFIG_LINE_TYPE_SECTION_BEGIN, "namespace", ""); - config_parser_apply_line(ctx, CONFIG_LINE_TYPE_KEYVALUE, - "type", value); - return TRUE; -} - static void socket_apply(struct config_parser_context *ctx) { const struct socket_set *set = &ctx->old->socket_set; @@ -608,7 +593,7 @@ bool old_settings_handle(struct config_parser_context *ctx, ctx->old->auth_section = 1; return TRUE; } else if (ctx->pathlen == 0 && strcmp(key, "namespace") == 0) - return old_namespace(ctx, value); + return TRUE; else if (ctx->pathlen == 0 && strcmp(key, "protocol") == 0 && strcmp(value, "managesieve") == 0) { obsolete(ctx, "protocol managesieve {} has been replaced by protocol sieve { }"); -- 2.47.3