aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-05-17 20:52:31 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-05-17 20:52:31 +0000
commit88b00ff0ca283e8c2e80587a1f05e01b922c9b89 (patch)
treeafe2d63bbf0a8d4d3340a0b7141b20f5a7d88668 /driver.c
parenta740d71a69fb785d63d498f99fa3a9c5f607c7fb (diff)
downloadfetchmail-88b00ff0ca283e8c2e80587a1f05e01b922c9b89.tar.gz
fetchmail-88b00ff0ca283e8c2e80587a1f05e01b922c9b89.tar.bz2
fetchmail-88b00ff0ca283e8c2e80587a1f05e01b922c9b89.zip
Another step towards cleaner code.
svn path=/trunk/; revision=1017
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c13
1 files changed, 10 insertions, 3 deletions
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);
}
/*