aboutsummaryrefslogtreecommitdiffstats
path: root/smtp.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-11-04 16:22:43 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-11-04 16:22:43 +0000
commit3153b1bcc67a1d910a200170a3e669a377da95ee (patch)
tree9b4426f3a311e714222cc25fab02e45a6103933a /smtp.c
parent04fdca88243f7c19378104764157026d74ce8a6c (diff)
downloadfetchmail-3153b1bcc67a1d910a200170a3e669a377da95ee.tar.gz
fetchmail-3153b1bcc67a1d910a200170a3e669a377da95ee.tar.bz2
fetchmail-3153b1bcc67a1d910a200170a3e669a377da95ee.zip
Special socket I/O almost gone!
svn path=/trunk/; revision=479
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/smtp.c b/smtp.c
index 558c32b5..66d47f81 100644
--- a/smtp.c
+++ b/smtp.c
@@ -103,10 +103,17 @@ static int SMTP_check(FILE *sockfp,char *argbuf)
int ok;
char buf[SMTPBUFSIZE];
- if ((ok = SockGets(buf, sizeof(buf)-1, sockfp)) > 0) {
- buf[ok] = '\0';
+ if (fgets(buf, sizeof(buf)-1, sockfp) != (char *)NULL) {
if (outlevel == O_VERBOSE)
- fprintf(stderr, "SMTP< %s\n", buf);
+ {
+ char *sp, *tp;
+
+ for (tp = sp = buf; *sp; sp++)
+ if (*sp != '\r')
+ *tp++ = *sp;
+ *tp++ = '\0';
+ fprintf(stderr, "SMTP< %s", buf);
+ }
if (argbuf)
strcpy(argbuf,buf);
if (buf[0] == '1' || buf[0] == '2' || buf[0] == '3')