X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7dbf77c91c1031bbefff89e89da710dde152ac98..e5a9dba621b4301bfbe2bc05576ddc5ec752b1b5:/src/src/expand.c diff --git a/src/src/expand.c b/src/src/expand.c index fda06c61d..8677ccb5b 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.18 2005/03/22 16:52:06 ph10 Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.21 2005/05/10 10:19:11 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -333,6 +333,7 @@ static var_entry var_table[] = { { "caller_uid", vtype_uid, &real_uid }, { "compile_date", vtype_stringptr, &version_date }, { "compile_number", vtype_stringptr, &version_cnumber }, + { "csa_status", vtype_stringptr, &csa_status }, #ifdef WITH_OLD_DEMIME { "demime_errorlevel", vtype_int, &demime_errorlevel }, { "demime_reason", vtype_stringptr, &demime_reason }, @@ -394,6 +395,7 @@ static var_entry var_table[] = { { "message_body_size", vtype_int, &message_body_size }, { "message_headers", vtype_msgheaders, NULL }, { "message_id", vtype_stringptr, &message_id }, + { "message_linecount", vtype_int, &message_linecount }, { "message_size", vtype_int, &message_size }, #ifdef WITH_CONTENT_SCAN { "mime_anomaly_level", vtype_int, &mime_anomaly_level }, @@ -2332,8 +2334,8 @@ if (yes) /* If this is called from a lookup or an extract, we want to restore $value to what it was at the start of the item, so that it has this value during the -second string expansion. For the call from "if" to this function, save_lookup -is set to lookup_value, so that this statement does nothing. */ +second string expansion. For the call from "if" or "run" to this function, +save_lookup is set to lookup_value, so that this statement does nothing. */ lookup_value = save_lookup; @@ -3329,7 +3331,6 @@ while (*s != 0) case EITEM_RUN: { FILE *f; - uschar *old_lookup_value = NULL; uschar *arg; uschar **argv; pid_t pid; @@ -3409,18 +3410,17 @@ while (*s != 0) in lookup_value). */ f = fdopen(fd_out, "rb"); - old_lookup_value = lookup_value; lookup_value = NULL; lookup_value = cat_file(f, lookup_value, &lsize, &lptr, NULL); fclose(f); } - /* Process the yes/no strings */ + /* Process the yes/no strings; $value may be useful in both cases */ switch(process_yesno( skipping, /* were previously skipping */ runrc == 0, /* success/failure indicator */ - old_lookup_value, /* value to reset for string2 */ + lookup_value, /* value to reset for string2 */ &s, /* input pointer */ &yield, /* output pointer */ &size, /* output size */