aboutsummaryrefslogtreecommitdiffstats
path: root/sink.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-07-25 09:56:00 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-07-25 09:56:00 +0000
commit88dcfe08b97bb51edd6c1b8a9d20aa5e84012565 (patch)
tree9ad89f6f1258909a262d7d7d5ea370df9ecb95da /sink.c
parentb7a995759e5d2dc7741c1352d817b38af5cd1ef7 (diff)
downloadfetchmail-88dcfe08b97bb51edd6c1b8a9d20aa5e84012565.tar.gz
fetchmail-88dcfe08b97bb51edd6c1b8a9d20aa5e84012565.tar.bz2
fetchmail-88dcfe08b97bb51edd6c1b8a9d20aa5e84012565.zip
Almost ready to ship.
svn path=/trunk/; revision=3422
Diffstat (limited to 'sink.c')
-rw-r--r--sink.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sink.c b/sink.c
index bbe07cb8..061c9a97 100644
--- a/sink.c
+++ b/sink.c
@@ -652,8 +652,10 @@ int open_sink(struct query *ctl, struct msgblk *msg,
if (SMTP_from(ctl->smtp_socket, ap, options) != SM_OK)
{
+ int err = handle_smtp_report(ctl, msg);
+
SMTP_rset(ctl->smtp_socket); /* stay on the safe side */
- return(handle_smtp_report(ctl, msg));
+ return(err);
}
/*
@@ -1035,12 +1037,15 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
/* write message terminator */
if (SMTP_eom(ctl->smtp_socket) != SM_OK)
{
- SMTP_rset(ctl->smtp_socket); /* stay on the safe side */
if (handle_smtp_report(ctl, msg) != PS_REFUSED)
+ {
+ SMTP_rset(ctl->smtp_socket); /* stay on the safe side */
return(FALSE);
+ }
else
{
report(stderr, _("SMTP listener refused delivery\n"));
+ SMTP_rset(ctl->smtp_socket); /* stay on the safe side */
return(TRUE);
}
}