]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pgsql: ROLLBACK wasn't sent correctly in synchronous commit failures.
authorTimo Sirainen <tss@iki.fi>
Mon, 12 Jan 2009 17:23:19 +0000 (12:23 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 12 Jan 2009 17:23:19 +0000 (12:23 -0500)
--HG--
branch : HEAD

src/lib-sql/driver-pgsql.c

index ce5ab1ad4df2a5bc2b66dbb1cbfd68b3e123067e..2d701508ab8c85cedeef63b2403dec0476235793 100644 (file)
@@ -853,7 +853,7 @@ driver_pgsql_transaction_commit_s(struct sql_transaction_context *_ctx,
 
        if (ctx->failed) {
                *error_r = ctx->error;
-               if (!ctx->opened)
+               if (ctx->opened)
                        sql_exec(_ctx->db, "ROLLBACK");
        } else if (!ctx->opened)
                *error_r = NULL;