]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Use data stack frame with IO switch and destroy callbacks
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Jan 2021 09:21:20 +0000 (11:21 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 27 Oct 2021 17:18:37 +0000 (17:18 +0000)
src/lib/ioloop.c

index 209fa9999bea6bfa905ebffe4060f9859e7cdf92..e2488085ce68efae051dd6f91e3ba900dd223fa5 100644 (file)
@@ -865,8 +865,9 @@ void io_loop_destroy(struct ioloop **_ioloop)
         i_assert(ioloop == current_ioloop);
        if (array_is_created(&io_destroy_callbacks)) {
                io_destroy_callback_t *callback;
-               array_foreach_elem(&io_destroy_callbacks, callback)
+               array_foreach_elem(&io_destroy_callbacks, callback) T_BEGIN {
                        callback(current_ioloop);
+               } T_END;
        }
 
        io_loop_set_current(current_ioloop->prev);
@@ -977,8 +978,9 @@ void io_loop_set_current(struct ioloop *ioloop)
 
        current_ioloop = ioloop;
        if (array_is_created(&io_switch_callbacks)) {
-               array_foreach_elem(&io_switch_callbacks, callback)
+               array_foreach_elem(&io_switch_callbacks, callback) T_BEGIN {
                        callback(prev_ioloop);
+               } T_END;
        }
 }