From 15341cdae111f6689327d72e57341b6ef614c342 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 5 Dec 1996 04:57:57 +0000 Subject: Ready for Rachel. svn path=/trunk/; revision=602 --- smtp.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'smtp.c') diff --git a/smtp.c b/smtp.c index ea75560c..1ef1183c 100644 --- a/smtp.c +++ b/smtp.c @@ -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 */ -- cgit v1.2.3