From 873076638b05df0e1504c9d037437c602cfe763c Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Fri, 21 Jun 2024 00:56:14 +0200
Subject: [PATCH] lib-sieve-tool: sieve-tool - Rename filename to location
 parameter for sieve_tool_script_compile/open()

---
 src/lib-sieve-tool/sieve-tool.c | 10 +++++-----
 src/lib-sieve-tool/sieve-tool.h |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib-sieve-tool/sieve-tool.c b/src/lib-sieve-tool/sieve-tool.c
index 6957ed782..bd5a6a4e8 100644
--- a/src/lib-sieve-tool/sieve-tool.c
+++ b/src/lib-sieve-tool/sieve-tool.c
@@ -578,7 +578,7 @@ struct ostream *sieve_tool_open_output_stream(const char *filename)
  */
 
 struct sieve_binary *
-sieve_tool_script_compile(struct sieve_tool *tool, const char *filename,
+sieve_tool_script_compile(struct sieve_tool *tool, const char *location,
 			  const char *name)
 {
 	struct sieve_instance *svinst = tool->svinst;
@@ -589,8 +589,8 @@ sieve_tool_script_compile(struct sieve_tool *tool, const char *filename,
 	sieve_error_handler_accept_infolog(ehandler, TRUE);
 	sieve_error_handler_accept_debuglog(ehandler, svinst->debug);
 
-	if (sieve_compile(svinst, filename, name, ehandler, 0, &sbin, NULL) < 0)
-		i_fatal("failed to compile sieve script '%s'", filename);
+	if (sieve_compile(svinst, location, name, ehandler, 0, &sbin, NULL) < 0)
+		i_fatal("failed to compile sieve script '%s'", location);
 	i_assert(sbin != NULL);
 
 	sieve_error_handler_unref(&ehandler);
@@ -598,7 +598,7 @@ sieve_tool_script_compile(struct sieve_tool *tool, const char *filename,
 }
 
 struct sieve_binary *
-sieve_tool_script_open(struct sieve_tool *tool, const char *filename)
+sieve_tool_script_open(struct sieve_tool *tool, const char *location)
 {
 	struct sieve_instance *svinst = tool->svinst;
 	struct sieve_error_handler *ehandler;
@@ -608,7 +608,7 @@ sieve_tool_script_open(struct sieve_tool *tool, const char *filename)
 	sieve_error_handler_accept_infolog(ehandler, TRUE);
 	sieve_error_handler_accept_debuglog(ehandler, svinst->debug);
 
-	if (sieve_open(svinst, filename, NULL, ehandler, 0, &sbin, NULL) < 0)
+	if (sieve_open(svinst, location, NULL, ehandler, 0, &sbin, NULL) < 0)
 		i_fatal("failed to compile sieve script");
 	i_assert(sbin != NULL);
 
diff --git a/src/lib-sieve-tool/sieve-tool.h b/src/lib-sieve-tool/sieve-tool.h
index e7457cb18..e973a9e72 100644
--- a/src/lib-sieve-tool/sieve-tool.h
+++ b/src/lib-sieve-tool/sieve-tool.h
@@ -85,10 +85,10 @@ struct ostream *sieve_tool_open_output_stream(const char *filename);
  */
 
 struct sieve_binary *
-sieve_tool_script_compile(struct sieve_tool *tool, const char *filename,
+sieve_tool_script_compile(struct sieve_tool *tool, const char *location,
 			  const char *name);
 struct sieve_binary *
-sieve_tool_script_open(struct sieve_tool *tool, const char *filename);
+sieve_tool_script_open(struct sieve_tool *tool, const char *location);
 void sieve_tool_dump_binary_to(struct sieve_binary *sbin,
 			       const char *filename, bool hexdump);
 
-- 
GitLab