summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-20 12:29:46 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-11-20 12:29:46 +0000
commitb49e4d91a36e4e0057edd77a636c55bf343e294c (patch)
tree1713160594d7596d66966c6d1669b77022fd0857
parent315fe60c7cd20eae841370506e052abfaf700997 (diff)
downloadmailutils-b49e4d91a36e4e0057edd77a636c55bf343e294c.tar.gz
mailutils-b49e4d91a36e4e0057edd77a636c55bf343e294c.tar.bz2
Adjust for the recent changes in symbol space functions
-rw-r--r--libsieve/require.c4
-rw-r--r--libsieve/sieve.y26
2 files changed, 20 insertions, 10 deletions
diff --git a/libsieve/require.c b/libsieve/require.c
index 5a31251c1..1ad3d69e3 100644
--- a/libsieve/require.c
+++ b/libsieve/require.c
@@ -48,7 +48,7 @@ sieve_require (list_t slist)
if (strncmp (s, "comparator-", 11) == 0)
{
- if (sieve_require_comparator (s + 11))
+ if (sieve_require_comparator (sieve_machine, s + 11))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"source for the required comparator %s is not available",
@@ -63,7 +63,7 @@ sieve_require (list_t slist)
else
{
sieve_register_t *reg;
- reg = sieve_action_lookup (s);
+ reg = sieve_action_lookup (sieve_machine, s);
if (!reg)
{
sieve_compile_error (sieve_filename, sieve_line_num,
diff --git a/libsieve/sieve.y b/libsieve/sieve.y
index d767510e4..1901e4565 100644
--- a/libsieve/sieve.y
+++ b/libsieve/sieve.y
@@ -218,7 +218,8 @@ begin : /* empty */
test : command
{
- sieve_register_t *reg = sieve_test_lookup ($1.ident);
+ sieve_register_t *reg = sieve_test_lookup (sieve_machine,
+ $1.ident);
$$ = sieve_machine->pc;
if (!reg)
@@ -243,7 +244,8 @@ command : IDENT maybe_arglist
action : command
{
- sieve_register_t *reg = sieve_action_lookup ($1.ident);
+ sieve_register_t *reg = sieve_action_lookup (sieve_machine,
+ $1.ident);
$$ = sieve_machine->pc;
if (!reg)
@@ -407,7 +409,12 @@ mailer_t
sieve_get_mailer (sieve_machine_t mach)
{
if (!mach->mailer)
- mailer_create (&mach->mailer, NULL);
+ {
+ mailer_create (&mach->mailer, NULL);
+ if (mach->mu_debug)
+ mailer_set_debug (mach->mailer, mach->mu_debug);
+ }
+
return mach->mailer;
}
@@ -480,6 +487,9 @@ sieve_machine_destroy (sieve_machine_t *pmach)
mailer_destroy (&mach->mailer);
list_do (mach->destr_list, _run_destructor, NULL);
list_destroy (&mach->destr_list);
+ list_destroy (&mach->action_list);
+ list_destroy (&mach->test_list);
+ list_destroy (&mach->comp_list);
sieve_slist_destroy (&mach->memory_pool);
free (mach);
*pmach = NULL;
@@ -494,6 +504,9 @@ sieve_machine_begin (sieve_machine_t mach)
sieve_machine = mach;
sieve_error_count = 0;
sieve_code_instr (NULL);
+ sieve_register_standard_actions (mach);
+ sieve_register_standard_tests (mach);
+ sieve_register_standard_comparators (mach);
}
void
@@ -508,16 +521,13 @@ sieve_compile (sieve_machine_t mach, const char *name)
int rc;
sieve_machine_begin (mach);
- sieve_register_standard_actions ();
- sieve_register_standard_tests ();
- sieve_register_standard_comparators ();
if (sieve_lex_begin (name) == 0)
{
sieve_machine->filename = sieve_pstrdup (&sieve_machine->memory_pool,
name);
- rc = yyparse ();
- sieve_lex_finish ();
+ rc = yyparse ();
+ sieve_lex_finish ();
}
else
rc = 1;

Return to:

Send suggestions and report system problems to the System administrator.