aboutsummaryrefslogtreecommitdiffstats
path: root/transact.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2009-05-04 21:52:32 +0000
committerMatthias Andree <matthias.andree@gmx.de>2009-05-04 21:52:32 +0000
commit64c3c5394121ab9f5a93a8c6d2c48511ff720536 (patch)
treee7fa39c9b88c7928acfa3d476700732958b58051 /transact.c
parent51ee0c2fb3e59a2d79d68aa27d1e15d16bcbceba (diff)
downloadfetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.tar.gz
fetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.tar.bz2
fetchmail-64c3c5394121ab9f5a93a8c6d2c48511ff720536.zip
Major progress ticker bugfix/overhaul.
Progress tickers had been used inconsistently for a long time, and documentation was outdated, too. Factor out common code to ease maintenance, use the report_flush() function, and add and use a macro (want_progress()) to determine if progress ticker output is desired. This makes for a much more consistent look on screen and in logfiles and should be much easier to fix later on. TODO: test syslog output. svn path=/branches/BRANCH_6-3/; revision=5290
Diffstat (limited to 'transact.c')
-rw-r--r--transact.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/transact.c b/transact.c
index d66d2758..7f658bc8 100644
--- a/transact.c
+++ b/transact.c
@@ -367,7 +367,7 @@ static void print_ticker(int *tickervar, int bytes)
*tickervar += bytes;
while (*tickervar >= SIZETICKER)
{
- if (outlevel > O_SILENT && run.showdots && !run.use_syslog)
+ if (want_progress())
{
fputc('.', stdout);
fflush(stdout);
@@ -1265,7 +1265,7 @@ int readheaders(int sock,
return(PS_IOERR);
}
- if ((run.poll_interval == 0 || nodetach) && outlevel >= O_VERBOSE && !is_a_file(1) && !run.use_syslog)
+ if (want_progress())
fputc('#', stdout);
/* write error notifications */
@@ -1446,7 +1446,7 @@ int readbody(int sock, struct query *ctl, flag forward, int len)
release_sink(ctl);
return(PS_IOERR);
}
- else if (outlevel >= O_VERBOSE && !is_a_file(1) && !run.use_syslog)
+ else if (want_progress())
{
fputc('*', stdout);
fflush(stdout);