]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Handle each dict iteration flush in separate data stack frame
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 27 Dec 2022 22:38:57 +0000 (17:38 -0500)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 11 Jan 2023 22:07:40 +0000 (00:07 +0200)
src/dict/dict-commands.c

index d4a3f99df18b228b4f31f33742083eedd0723301..051e313f19cc44a830b0b77281e458c9e212bcf0 100644 (file)
@@ -682,7 +682,14 @@ static bool dict_connection_cmds_try_output_more(struct dict_connection *conn)
        array_foreach_elem(&conn->cmds, cmd) {
                if (cmd->iter == NULL) {
                        /* not an iterator */
-               } else if (cmd_iterate_flush(cmd) == 0) {
+                       continue;
+               }
+
+               int ret;
+               T_BEGIN {
+                       ret = cmd_iterate_flush(cmd);
+               } T_END;
+               if (ret == 0) {
                        /* unfinished */
                } else {
                        dict_connection_cmd_try_flush(&cmd);