src/log.c: Fix unexpected termination in logprintf (tiny change)

When errno was set to EPIPE before call to logprintf (e.g. during close of
SSL connection that was reset by peer), it will unexpectedly terminate wget.
It should exit only when EPIPE was triggered by logging code.

Regression by 0b5b100fc9
This commit is contained in:
Yuriy M. Kaminskiy 2014-12-03 12:18:10 +03:00 committed by Tim Rühsen
parent 0d9615292e
commit ec5e0f421c
1 changed files with 1 additions and 0 deletions

View File

@ -536,6 +536,7 @@ logprintf (enum log_options o, const char *fmt, ...)
CHECK_VERBOSE (o);
xzero (lpstate);
errno = 0;
do
{
va_start (args, fmt);