From dff597cccfaeee0382965270eb95b954670e99ee Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tuomi@open-xchange.com>
Date: Fri, 10 May 2024 11:04:34 +0300
Subject: [PATCH] lib-sieve: ldap - Adjust to new var_expand API

---
 src/lib-sieve/storage/ldap/sieve-ldap-db.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib-sieve/storage/ldap/sieve-ldap-db.c b/src/lib-sieve/storage/ldap/sieve-ldap-db.c
index 71cb4867d..5432c65e9 100644
--- a/src/lib-sieve/storage/ldap/sieve-ldap-db.c
+++ b/src/lib-sieve/storage/ldap/sieve-ldap-db.c
@@ -1252,7 +1252,7 @@ int sieve_ldap_db_lookup_script(struct ldap_connection *conn,
 	struct sieve_storage *storage = &lstorage->storage;
 	const struct sieve_ldap_storage_settings *set = &lstorage->set;
 	struct sieve_ldap_script_lookup_request *request;
-	const struct var_expand_table *tab;
+	struct var_expand_params params;
 	char **attr_names;
 	const char *error;
 	string_t *str;
@@ -1262,10 +1262,10 @@ int sieve_ldap_db_lookup_script(struct ldap_connection *conn,
 	request = p_new(pool, struct sieve_ldap_script_lookup_request, 1);
 	request->request.pool = pool;
 
-	tab = db_ldap_get_var_expand_table(conn, name);
+	params.table = db_ldap_get_var_expand_table(conn, name);
 
 	str = t_str_new(512);
-	if (var_expand(str, set->base, tab, &error) <= 0) {
+	if (var_expand(str, set->base, &params, &error) <= 0) {
 		e_error(storage->event, "db: "
 			"Failed to expand base=%s: %s",
 			set->base, error);
@@ -1277,7 +1277,7 @@ int sieve_ldap_db_lookup_script(struct ldap_connection *conn,
 	attr_names[0] = p_strdup(pool, set->sieve_ldap_mod_attr);
 
 	str_truncate(str, 0);
-	if (var_expand(str, set->sieve_ldap_filter, tab, &error) <= 0) {
+	if (var_expand(str, set->sieve_ldap_filter, &params, &error) <= 0) {
 		e_error(storage->event, "db: "
 			"Failed to expand sieve_ldap_filter=%s: %s",
 			set->sieve_ldap_filter, error);
-- 
GitLab