mirror of
https://github.com/mirror/wget.git
synced 2025-03-14 03:40:15 +08:00
Fix confusing 'Cannot write to ... (Success)' message
* src/http.c (gethttp): Store/restore errno value. Reported-by: Christian Rosentreter, Andries E. Brouwer
This commit is contained in:
parent
8e8900613c
commit
25525f8037
@ -4164,7 +4164,11 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
|
||||
err = open_output_stream (hs, count, &fp);
|
||||
if (err != RETROK)
|
||||
{
|
||||
/* Make sure that errno doesn't get clobbered.
|
||||
* This is the case for OpenSSL's SSL_shutdown(). */
|
||||
int tmp_errno = errno;
|
||||
CLOSE_INVALIDATE (sock);
|
||||
errno = tmp_errno;
|
||||
retval = err;
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user