Skip to content

Commit

Permalink
lib-dict: Fix compability for 2.2
Browse files Browse the repository at this point in the history
Fixes commit 595b94c compability with
2.2.
  • Loading branch information
cmouse committed Jan 13, 2017
1 parent d5d8f7b commit 00fc96e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib-dict/dict-sql.c
Expand Up @@ -1269,13 +1269,13 @@ static void sql_dict_set(struct dict_transaction_context *_ctx,
const struct dict_sql_map *map;
ARRAY_TYPE(const_string) values;

if (ctx->error != NULL)
if (ctx->failed)
return;

map = sql_dict_find_map(dict, key, &values);
if (map == NULL) {
ctx->error = i_strdup_printf(
"sql dict set: Invalid/unmapped key: %s", key);
ctx->failed = TRUE;
i_error("sql dict set: Invalid/unmapped key: %s", key);
return;
}

Expand Down Expand Up @@ -1312,8 +1312,8 @@ static void sql_dict_set(struct dict_transaction_context *_ctx,
field->value = value;

if (sql_dict_set_query(ctx, &build, &query, &error) < 0) {
ctx->error = i_strdup_printf(
"dict-sql: Failed to set %s: %s", key, error);
i_error("dict-sql: Failed to set %s: %s", key, error);
ctx->failed = TRUE;
} else {
sql_update_get_rows(ctx->sql_ctx, query,
sql_dict_next_set_row(ctx));
Expand Down

0 comments on commit 00fc96e

Please sign in to comment.