]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-sql: Support dict_iterate_values()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 17 Nov 2020 12:41:31 +0000 (14:41 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 23 Nov 2020 12:04:46 +0000 (12:04 +0000)
src/lib-dict-backend/dict-sql.c

index f2027b992625d8d2871371a9d890f1de29f33421..252c6098c3eeee2018a4df72a91786a759d8eaea 100644 (file)
@@ -50,7 +50,6 @@ struct sql_dict_iterate_context {
        bool synchronous_result;
        bool iter_query_sent;
        bool allow_null_map; /* allow next map to be NULL */
-       const char *values[2];
        const char *error;
 };
 
@@ -867,9 +866,8 @@ static bool sql_dict_iterate(struct dict_iterate_context *_ctx,
 
        *key_r = str_c(ctx->key);
        if ((ctx->flags & DICT_ITERATE_FLAG_NO_VALUE) == 0) {
-               ctx->values[0] = sql_dict_result_unescape_value(ctx->map,
-                                       pool_datastack_create(), ctx->result);
-               *values_r = ctx->values;
+               *values_r = sql_dict_result_unescape_values(ctx->map,
+                       pool_datastack_create(), ctx->result);
        }
        return TRUE;
 }