aboutsummaryrefslogtreecommitdiffstats
path: root/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/smtp.c b/smtp.c
index 0133e5a9..877e2e5c 100644
--- a/smtp.c
+++ b/smtp.c
@@ -95,11 +95,12 @@ int SMTP_eom(FILE *sockfp)
int SMTP_ok(FILE *sockfp)
/* returns status of SMTP connection */
{
- int n;
- char buf[SMTPBUFSIZE];
+ char buf[SMTPBUFSIZE], *ip;
- while ((n = SockGets(buf, sizeof(buf)-1, sockfp)) > 0)
+ while ((ip = fgets(buf, sizeof(buf)-1, sockfp)))
{
+ int n = strlen(ip);
+
if (n < 4)
return SM_ERROR;
buf[n] = '\0';