]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-client: Use the proper active ioloop while calling commit() and lookup() callbacks
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 22 Mar 2021 14:50:04 +0000 (16:50 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 6 May 2021 06:28:50 +0000 (06:28 +0000)
If the callbacks did any IO/timeout changes, they would have gone to a wrong
ioloop.

src/lib-dict/dict-client.c

index ee16e10ce47a8799fe93f7e54b1abb6e215195d0..ee69f056b3fb18d1079bb389b2639f9e9b582059 100644 (file)
@@ -956,7 +956,9 @@ client_dict_lookup_async_callback(struct client_dict_cmd *cmd,
                          cmd->query);
        }
 
+       dict_pre_api_callback(&dict->dict);
        cmd->api_callback.lookup(&result, cmd->api_callback.context);
+       dict_post_api_callback(&dict->dict);
 }
 
 static void
@@ -1330,7 +1332,9 @@ client_dict_transaction_commit_callback(struct client_dict_cmd *cmd,
        }
        client_dict_transaction_free(&cmd->trans);
 
+       dict_pre_api_callback(&dict->dict);
        cmd->api_callback.commit(&result, cmd->api_callback.context);
+       dict_post_api_callback(&dict->dict);
 }