diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-11-04 17:13:38 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-11-04 17:13:38 +0000 |
commit | f9d612cbb4b17059d6f56bfc6cbae09ada2fde2e (patch) | |
tree | e106d5fe2503ee001f49be692160e3698f40daf2 /driver.c | |
parent | 463801e2cca6d519050daa49ba330f0a14e46da8 (diff) | |
download | fetchmail-f9d612cbb4b17059d6f56bfc6cbae09ada2fde2e.tar.gz fetchmail-f9d612cbb4b17059d6f56bfc6cbae09ada2fde2e.tar.bz2 fetchmail-f9d612cbb4b17059d6f56bfc6cbae09ada2fde2e.zip |
Eliminate SockGets().
svn path=/trunk/; revision=482
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -527,12 +527,19 @@ struct query *ctl; /* query control record */ oldlen = 0; while (delimited || len > 0) { - if ((n = strip_gets(buf,sizeof(buf),sockfp)) < 0) + char *sp, *tp; + + if (fgets(buf,sizeof(buf),sockfp) == (char *)NULL) return(PS_SOCKET); vtalarm(ctl->timeout); + for (tp = sp = buf; *sp; sp++) + if (*sp != '\r' && *sp != '\n') + *tp++ = *sp; + *tp++ = '\0'; + /* write the message size dots */ - if (n > 0) + if ((n = strlen(buf)) > 0) { sizeticker += n; while (sizeticker >= SIZETICKER) @@ -575,7 +582,7 @@ struct query *ctl; /* query control record */ * We deal with RFC822 continuation lines here. * Replace previous '\n' with '\r' so nxtaddr * and reply_hack will be able to see past it. - * (We know this is safe because SocketGets stripped + * (We know this is safe because we stripped * out all carriage returns in the read loop above * and we haven't reintroduced any since then.) * We'll undo this before writing the header. |