]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-cdb: Fix to use new dict.iterate() API
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 23 Nov 2020 14:49:49 +0000 (16:49 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 23 Nov 2020 14:49:49 +0000 (16:49 +0200)
Forgot in 65b7f04f945781cd042f5ad2f6f104f532143ee7

src/lib-dict-backend/dict-cdb.c

index 9f848dd242e4260749c71fce30f13b7adef7cb52..caec6f33e10c3d5357c3daeb5bb233ff8054a7be 100644 (file)
@@ -26,7 +26,7 @@ struct cdb_dict_iterate_context {
 
        enum dict_iterate_flags flags;
        buffer_t *buffer;
-       const char **paths;
+       const char **paths, *values[2];
        unsigned cptr;
        char *error;
 };
@@ -178,7 +178,7 @@ cdb_dict_next(struct cdb_dict_iterate_context *ctx, const char **key_r)
 }
 
 static bool cdb_dict_iterate(struct dict_iterate_context *_ctx,
-                            const char **key_r, const char **value_r)
+                            const char **key_r, const char *const **values_r)
 {
        struct cdb_dict_iterate_context *ctx =
                (struct cdb_dict_iterate_context *)_ctx;
@@ -225,7 +225,8 @@ static bool cdb_dict_iterate(struct dict_iterate_context *_ctx,
        }
 
        data[datalen] = '\0';
-       *value_r = data;
+       ctx->values[0] = data;
+       *values_r = ctx->values;
 
        return TRUE;
 }