]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict: dict_switch_ioloop() - Move also failure timeout
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 11 Sep 2020 11:28:11 +0000 (14:28 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 11 Sep 2020 14:25:33 +0000 (14:25 +0000)
Forgotten in 178bb676ea1dd380789d3587bf5e64fd85a29d7a

src/lib-dict/dict.c

index ed2b8a406a2e6c03a3b4bf8a6b59932313d87a71..26c0e6dab83ff6fca6feb2538e5b01d160a806a6 100644 (file)
@@ -178,10 +178,18 @@ void dict_wait(struct dict *dict)
 
 bool dict_switch_ioloop(struct dict *dict)
 {
-       if (dict->v.switch_ioloop != NULL)
-               return dict->v.switch_ioloop(dict);
-       else
-               return FALSE;
+       struct dict_commit_callback_ctx *commit;
+       bool ret = FALSE;
+
+       for (commit = dict->commits; commit != NULL; commit = commit->next) {
+               commit->to = io_loop_move_timeout(&commit->to);
+               ret = TRUE;
+       }
+       if (dict->v.switch_ioloop != NULL) {
+               if (dict->v.switch_ioloop(dict))
+                       return TRUE;
+       }
+       return ret;
 }
 
 static bool dict_key_prefix_is_valid(const char *key)