This is used to set hide_log_values in dict op settings.
bool (*switch_ioloop)(struct dict *dict);
void (*set_timestamp)(struct dict_transaction_context *ctx,
const struct timespec *ts);
+ void (*set_hide_log_values)(struct dict_transaction_context *ctx,
+ bool hide_log_values);
};
struct dict_commit_callback_ctx;
struct dict_op_settings_private {
char *username;
char *home_dir;
+
+ bool hide_log_values;
};
struct dict {
ctx->no_slowness_warning = TRUE;
}
+void dict_transaction_set_hide_log_values(struct dict_transaction_context *ctx,
+ bool hide_log_values)
+{
+ /* Apply hide_log_values to the current transactions dict op settings */
+ ctx->set.hide_log_values = hide_log_values;
+ if (ctx->dict->v.set_hide_log_values != NULL)
+ ctx->dict->v.set_hide_log_values(ctx, hide_log_values);
+}
+
void dict_transaction_set_timestamp(struct dict_transaction_context *ctx,
const struct timespec *ts)
{
i_zero(dest_r);
dest_r->username = i_strdup(source->username);
dest_r->home_dir = i_strdup(source->home_dir);
+ dest_r->hide_log_values = source->hide_log_values;
}
void dict_op_settings_private_free(struct dict_op_settings_private *set)
const char *username;
/* home directory for the user, if known */
const char *home_dir;
+
+ /* Hide values when logging about this transaction. */
+ bool hide_log_values;
};
struct dict_lookup_result {
dict-sql with Cassandra backend does anything with this. */
void dict_transaction_set_timestamp(struct dict_transaction_context *ctx,
const struct timespec *ts);
+
+/* Set hide_log_values for the transaction. Currently only
+ dict-sql with Cassandra backend does anything with this. */
+void dict_transaction_set_hide_log_values(struct dict_transaction_context *ctx,
+ bool hide_log_values);
/* Commit the transaction. Returns 1 if ok, 0 if dict_atomic_inc() was used
on a nonexistent key, -1 if failed. */
int dict_transaction_commit(struct dict_transaction_context **ctx,