diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-12-05 04:57:57 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-12-05 04:57:57 +0000 |
commit | 15341cdae111f6689327d72e57341b6ef614c342 (patch) | |
tree | 307f22b5a6171639a2ce97efefb72046e906109d /smtp.c | |
parent | c714471f650de665f03591e2c5652d2831f04684 (diff) | |
download | fetchmail-15341cdae111f6689327d72e57341b6ef614c342.tar.gz fetchmail-15341cdae111f6689327d72e57341b6ef614c342.tar.bz2 fetchmail-15341cdae111f6689327d72e57341b6ef614c342.zip |
Ready for Rachel.
svn path=/trunk/; revision=602
Diffstat (limited to 'smtp.c')
-rw-r--r-- | smtp.c | 40 |
1 files changed, 1 insertions, 39 deletions
@@ -92,16 +92,7 @@ int SMTP_eom(FILE *sockfp) return ok; } -void SMTP_rset(FILE *sockfp) -/* send a "RSET" message to the SMTP listener */ -{ - SockPrintf(sockfp,"RSET\r\n"); - if (outlevel == O_VERBOSE) - fprintf(stderr, "SMTP> RSET\n"); -} - - -static int SMTP_check(FILE *sockfp) +int SMTP_ok(FILE *sockfp) /* returns status of SMTP connection */ { int n; @@ -123,33 +114,4 @@ static int SMTP_check(FILE *sockfp) return SM_UNRECOVERABLE; } -int SMTP_ok(FILE *sockfp) -/* accepts SMTP response, returns status of SMTP connection */ -{ - int ok; - - /* I can tell that the SMTP server connection is ok if I can read a - status message that starts with "1xx" ,"2xx" or "3xx". - Therefore, it can't be ok if there's no data waiting to be read - - Tried to deal with this with a call to SockDataWaiting, but - it failed badly. - - */ - - ok = SMTP_check(sockfp); - if (ok == SM_ERROR) /* if we got an error, */ - { - SMTP_rset(sockfp); - ok = SMTP_check(sockfp); /* how does it look now ? */ - if (ok == SM_OK) - ok = SM_ERROR; /* It's just a simple error, for*/ - /* the current message */ - else - ok = SM_UNRECOVERABLE; /* if it still says error, we're */ - /* in bad shape */ - } - return ok; -} - /* smtp.c ends here */ |