Skip to content
Snippets Groups Projects
Commit c67ac6db authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Made lda plugin properly refer to the main script as 'main script' and not the...

Made lda plugin properly refer to the main script as 'main script' and not the basename of the sieve file (which is of no interest to the user for the main script).
parent ec8fc9f2
No related branches found
No related tags found
No related merge requests found
......@@ -156,14 +156,15 @@ struct sieve_binary *sieve_compile
*/
struct sieve_binary *sieve_open
(const char *script_path, struct sieve_error_handler *ehandler, bool *exists_r)
(const char *script_path, const char *script_name,
struct sieve_error_handler *ehandler, bool *exists_r)
{
struct sieve_script *script;
struct sieve_binary *sbin;
const char *binpath;
/* First open the scriptfile itself */
script = sieve_script_create(script_path, NULL, ehandler, exists_r);
script = sieve_script_create(script_path, script_name, ehandler, exists_r);
if ( script == NULL ) {
/* Failed */
......
......@@ -61,8 +61,8 @@ struct sieve_binary *sieve_compile
*
*/
struct sieve_binary *sieve_open
(const char *scriptpath, struct sieve_error_handler *ehandler,
bool *exists_r);
(const char *scriptpath, const char *script_name,
struct sieve_error_handler *ehandler, bool *exists_r);
/* sieve_save:
* Saves the binary as the file indicated by the path parameter.
......
......@@ -127,7 +127,7 @@ static int lda_sieve_run
if ( debug )
sieve_sys_info("opening script %s", script_path);
if ( (sbin=sieve_open(script_path, ehandler, &exists)) == NULL ) {
if ( (sbin=sieve_open(script_path, "main script", ehandler, &exists)) == NULL ) {
ret = sieve_get_errors(ehandler) > 0 ? -1 : 0;
......
......@@ -96,7 +96,7 @@ struct sieve_binary *bin_open_sieve_script(const char *filename)
ehandler = sieve_stderr_ehandler_create(0);
sieve_error_handler_accept_infolog(ehandler, TRUE);
if ( (sbin = sieve_open(filename, ehandler, NULL)) == NULL ) {
if ( (sbin = sieve_open(filename, NULL, ehandler, NULL)) == NULL ) {
sieve_error_handler_unref(&ehandler);
i_fatal("Failed to compile sieve script\n");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.