From 88b00ff0ca283e8c2e80587a1f05e01b922c9b89 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 17 May 1997 20:52:31 +0000 Subject: Another step towards cleaner code. svn path=/trunk/; revision=1017 --- driver.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'driver.c') diff --git a/driver.c b/driver.c index afe303c2..7349efdf 100644 --- a/driver.c +++ b/driver.c @@ -1028,17 +1028,24 @@ char *realname; /* real name of host */ SockWrite(ctl->smtp_socket, "\r\n", 2); } - /* * If we're using IMAP4 or something else that can fetch headers * separately from bodies, it's time to grab the body now. This * fetch may be skipped if we got an anti-spam or other error * response from SMTP above. + * + * The protocol methods should never fail here. Just in case... + * we return PS_TRANSIENT because failure could not be due + * to desynchronization or permanent request failure. */ if (protocol->fetch_body) { - (protocol->trail)(sock, ctl, -1); - (protocol->fetch_body)(sock, ctl, num, &remaining); + int ok; + + if ((ok = (protocol->trail)(sock, ctl, num))) + return(PS_TRANSIENT); + if ((ok = (protocol->fetch_body)(sock, ctl, num, &remaining))) + return(PS_TRANSIENT); } /* -- cgit v1.2.3