aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2003-10-10 13:29:25 +0000
committerEric S. Raymond <esr@thyrsus.com>2003-10-10 13:29:25 +0000
commit9d7f8c9d54466a2df5d06a0ef268ae094d521203 (patch)
treef4ccea1eb334e056f24a9f49cd91cdd9bca3858d /transact.c
parent4957764ad5812148851bda92080eb6bb694452fc (diff)
downloadfetchmail-9d7f8c9d54466a2df5d06a0ef268ae094d521203.tar.gz
fetchmail-9d7f8c9d54466a2df5d06a0ef268ae094d521203.tar.bz2
fetchmail-9d7f8c9d54466a2df5d06a0ef268ae094d521203.zip
Better default for showdots.
svn path=/trunk/; revision=3842
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/transact.c b/transact.c
index 69053b56..49cffc08 100644
--- a/transact.c
+++ b/transact.c
@@ -448,7 +448,7 @@ int readheaders(int sock,
*/
if ( n && buf[n-1] != '\n' ) {
overlong = TRUE;
- rline = (char *) realloc(line, linelen);
+ rline = (char *) realloc(line, linelen + 1);
if (rline == NULL)
{
free (line);
@@ -456,6 +456,7 @@ int readheaders(int sock,
}
line = rline;
memcpy(line + linelen - n, buf, n);
+ line[linelen] = '\0';
ch = ' '; /* So the next iteration starts */
continue;
}
@@ -551,7 +552,7 @@ int readheaders(int sock,
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if ((!run.use_syslog && !isafile(1)) || run.showdots)
+ if (outlevel > O_SILENT && run.showdots)
{
fputc('.', stdout);
fflush(stdout);
@@ -693,7 +694,7 @@ int readheaders(int sock,
}
if (ctl->rewrite)
- line = reply_hack(line, ctl->server.truename);
+ line = reply_hack(line, ctl->server.truename, &linelen);
/*
* OK, this is messy. If we're forwarding by SMTP, it's the
@@ -1337,7 +1338,7 @@ int readbody(int sock, struct query *ctl, flag forward, int len)
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if (outlevel > O_SILENT && (((run.poll_interval == 0 || nodetach) && !isafile(1)) || run.showdots))
+ if (outlevel > O_SILENT && run.showdots)
{
fputc('.', stdout);
fflush(stdout);