]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict: dict - Change background to delayed_callback
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 10 Sep 2020 14:42:19 +0000 (17:42 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 11 Sep 2020 09:42:07 +0000 (12:42 +0300)
It better describes what it's intended to do.

src/lib-dict/dict.c

index 68039bc24514bacedcd723438d5cb4267e9380ea..eabd9f681dc895f670a757dd6b948342d1e8f1eb 100644 (file)
@@ -18,7 +18,7 @@ struct dict_commit_callback_ctx {
        struct timeout *to;
        void *context;
        struct dict_commit_result result;
-       bool background:1;
+       bool delayed_callback:1;
 };
 
 struct dict_lookup_callback_ctx {
@@ -275,7 +275,7 @@ static void dict_commit_callback(const struct dict_commit_result *result,
 
        i_assert(result->ret >= 0 || result->error != NULL);
        ctx->result = *result;
-       if (ctx->background) {
+       if (ctx->delayed_callback) {
                ctx->result.error = p_strdup(ctx->pool, ctx->result.error);
                ctx->to = timeout_add_short(0, dict_commit_async_timeout, ctx);
        } else {
@@ -543,7 +543,7 @@ void dict_transaction_commit_async(struct dict_transaction_context **_ctx,
        cctx->callback = callback;
        cctx->context = context;
        cctx->event = ctx->event;
-       cctx->background = TRUE;
+       cctx->delayed_callback = TRUE;
        ctx->dict->v.transaction_commit(ctx, TRUE, dict_commit_callback, cctx);
 }