aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--configure.ac4
-rw-r--r--src/builtin/sieve.bi38
3 files changed, 28 insertions, 19 deletions
diff --git a/NEWS b/NEWS
index ea2da239..46b65642 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,13 @@
-Mailfromd NEWS -- history of user-visible changes. 2016-11-09
+Mailfromd NEWS -- history of user-visible changes. 2016-12-08
Copyright (C) 2005-2016 Sergey Poznyakoff
See the end of file for copying conditions.
Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua>
+Version 8.0.90 - (Git)
+
+
Version 8.0, 2016-11-09
This version is a major rewrite. Main changes:
diff --git a/configure.ac b/configure.ac
index 304222fb..d8873c5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
AC_PREREQ(2.63)
m4_define([MF_VERSION_MAJOR], 8)
m4_define([MF_VERSION_MINOR], 0)
-dnl m4_define([MF_VERSION_PATCH], 97)
+m4_define([MF_VERSION_PATCH], 90)
AC_INIT([mailfromd],
MF_VERSION_MAJOR.MF_VERSION_MINOR[]m4_ifdef([MF_VERSION_PATCH],.MF_VERSION_PATCH),
[bug-mailfromd@gnu.org.ua],
@@ -101,7 +101,7 @@ AC_CHECK_FUNCS([vsyslog setegid setregid setresgid seteuid setreuid \
AC_REPLACE_FUNCS(daemon)
# Check for GNU Mailutils
-AM_GNU_MAILUTILS([3.0], [all auth dbm sieve], [:])
+AM_GNU_MAILUTILS([3.0.90], [all auth dbm sieve], [:])
### Check for Emacs site-lisp directory
AM_PATH_LISPDIR
diff --git a/src/builtin/sieve.bi b/src/builtin/sieve.bi
index cbb52466..ea531a83 100644
--- a/src/builtin/sieve.bi
+++ b/src/builtin/sieve.bi
@@ -19,14 +19,14 @@
#include "msg.h"
static void
-_sieve_text_action_log(void *env_ptr,
- mu_stream_t stream, size_t msgno,
- mu_message_t msg,
+_sieve_text_action_log(mu_sieve_machine_t mach,
const char *action, const char *fmt, va_list ap)
{
- eval_environ_t env = env_ptr;
+ mu_stream_t stream;
+ eval_environ_t env = mu_sieve_get_data (mach);
const char *id;
-
+
+ mu_sieve_get_diag_stream(mach, &stream);
mu_stream_printf(stream, "\033s<%d>", MU_LOG_NOTICE);
id = mailfromd_msgid(env_get_context(env));
if (id && id[0])
@@ -41,16 +41,16 @@ _sieve_text_action_log(void *env_ptr,
}
static void
-_sieve_file_action_log(void *env_ptr,
- mu_stream_t stream, size_t msgno,
- mu_message_t msg,
+_sieve_file_action_log(mu_sieve_machine_t mach,
const char *action, const char *fmt, va_list ap)
{
- eval_environ_t env = env_ptr;
+ mu_stream_t stream;
+ eval_environ_t env = mu_sieve_get_data(mach);
struct locus locus;
- _sieve_text_action_log(env_ptr, stream, msgno, msg, action, fmt, ap);
+ _sieve_text_action_log(mach, action, fmt, ap);
+ mu_sieve_get_diag_stream(mach, &stream);
env_get_locus(env, &locus);
mu_stream_printf(stream, "\033f<%lu>%s\033l<%lu>\033s<%d>\033O<%d>%s\n",
(unsigned long) strlen(locus.file), locus.file,
@@ -67,29 +67,35 @@ mach_cleanup(void *ptr)
mu_sieve_machine_destroy(&mach);
}
+static void
+modify_debug_flags(mu_debug_level_t set, mu_debug_level_t clr)
+{
+ mu_debug_level_t lev;
+
+ mu_debug_get_category_level(mu_sieve_debug_handle, &lev);
+ mu_debug_set_category_level(mu_sieve_debug_handle, (lev & ~clr) | set);
+}
+
MF_DEFUN(sieve, NUMBER, NUMBER nmsg, STRING script, OPTIONAL, NUMBER flags,
STRING file, NUMBER line)
{
mu_sieve_machine_t mach;
- int sieve_debug_flags = 0;
int rc;
int retval = 0;
int f = MF_OPTVAL(flags);
mu_attribute_t attr;
mu_message_t msg;
- rc = mu_sieve_machine_init(&mach);
+ rc = mu_sieve_machine_create(&mach);
MF_ASSERT(rc == 0, mfe_failure,
_("failed to initialize sieve machine: %s"),
mu_strerror(rc));
MF_DCL_CLEANUP(mach, mach_cleanup);
if (f & MF_SIEVE_DEBUG_TRACE)
- sieve_debug_flags |= MU_SIEVE_DEBUG_TRACE;
+ modify_debug_flags(MU_DEBUG_LEVEL_MASK(MU_DEBUG_TRACE4), 0);
if (f & MF_SIEVE_DEBUG_INSTR)
- sieve_debug_flags |= MU_SIEVE_DEBUG_INSTR;
-
- mu_sieve_set_debug_level(mach, sieve_debug_flags);
+ modify_debug_flags(MU_DEBUG_LEVEL_MASK(MU_DEBUG_TRACE9), 0);
mu_sieve_set_data(mach, env);

Return to:

Send suggestions and report system problems to the System administrator.