summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-18 00:59:24 +0000
committerStef Walter <stef@memberwebs.com>2004-09-18 00:59:24 +0000
commite5a50721d21a36b8f9f31fd4ef21e182781b22e2 (patch)
tree25bb93ebf90f52c377d1ae228277d0e54dd78343 /common
parent5adfaef6d466de5963d06338742b6faa7ef64dca (diff)
- Same changes to the env var setup
Diffstat (limited to 'common')
-rw-r--r--common/smtppass.c6
-rw-r--r--common/smtppass.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/common/smtppass.c b/common/smtppass.c
index ec2bb89..fa82b84 100644
--- a/common/smtppass.c
+++ b/common/smtppass.c
@@ -123,7 +123,7 @@ spthread_t;
/* The set of delimiters that can be present between config and value */
#define CFG_DELIMS ": \t"
-#define LINE_TOO_LONG(ctx) ((ctx)->linelen >= (SP_LINE_LENGTH - 2))
+#define LINE_TOO_LONG(l) ((l) >= (SP_LINE_LENGTH - 2))
/* -----------------------------------------------------------------------
* CONFIGURATION OPTIONS
@@ -1364,7 +1364,7 @@ static int read_server_response(spctx_t* ctx)
return 0;
}
-void sp_setup_env(spctx_t* ctx)
+void sp_setup_env(spctx_t* ctx, int file)
{
if(ctx->sender)
setenv("SENDER", ctx->sender, 1);
@@ -1372,7 +1372,7 @@ void sp_setup_env(spctx_t* ctx)
if(ctx->recipients)
setenv("RECIPIENTS", ctx->recipients, 1);
- if(ctx->cachename[0])
+ if(file && ctx->cachename[0])
setenv("EMAIL", ctx->cachename, 1);
setenv("TMP", g_state.directory, 1);
diff --git a/common/smtppass.h b/common/smtppass.h
index c287067..72f31c8 100644
--- a/common/smtppass.h
+++ b/common/smtppass.h
@@ -215,10 +215,10 @@ int sp_fail_data(spctx_t* ctx, const char* smtp_status);
/*
* Setup the environment with context info. This is useful
- * if you're going to fork another process. Be sure to fork
+ * if you're going to fork another process. Be sure to exec
* soon after to prevent the strings from going out of scope.
*/
-void sp_setup_env(spctx_t* ctx);
+void sp_setup_env(spctx_t* ctx, int file);
/*
* Log a message. levels are syslog levels. Syntax is just