mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
Honour --stderr with the -v option.
Fixed a file handle leak in the command line client if more than one --stderr option was given.
This commit is contained in:
parent
a81a16beac
commit
8c377ad965
6
CHANGES
6
CHANGES
@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Fandrich (25 Jun 2008)
|
||||||
|
- Honour --stderr with the -v option.
|
||||||
|
|
||||||
|
- Fixed a file handle leak in the command line client if more than one
|
||||||
|
--stderr option was given.
|
||||||
|
|
||||||
Daniel Stenberg (22 Jun 2008)
|
Daniel Stenberg (22 Jun 2008)
|
||||||
- Eduard Bloch filed the debian bug report #487567
|
- Eduard Bloch filed the debian bug report #487567
|
||||||
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
|
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
|
||||||
|
@ -1950,7 +1950,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'u': /* --crlf */
|
case 'u': /* --crlf */
|
||||||
/* LF -> CRLF conversinon? */
|
/* LF -> CRLF conversion? */
|
||||||
config->crlf = TRUE;
|
config->crlf = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1960,6 +1960,8 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
if(!newfile)
|
if(!newfile)
|
||||||
warnf(config, "Failed to open %s!\n", nextarg);
|
warnf(config, "Failed to open %s!\n", nextarg);
|
||||||
else {
|
else {
|
||||||
|
if(config->errors_fopened)
|
||||||
|
fclose(config->errors);
|
||||||
config->errors = newfile;
|
config->errors = newfile;
|
||||||
config->errors_fopened = TRUE;
|
config->errors_fopened = TRUE;
|
||||||
}
|
}
|
||||||
@ -3449,7 +3451,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||||||
config->trace_stream = stdout;
|
config->trace_stream = stdout;
|
||||||
else if(curlx_strequal("%", config->trace_dump))
|
else if(curlx_strequal("%", config->trace_dump))
|
||||||
/* Ok, this is somewhat hackish but we do it undocumented for now */
|
/* Ok, this is somewhat hackish but we do it undocumented for now */
|
||||||
config->trace_stream = stderr;
|
config->trace_stream = config->errors; /* aka stderr */
|
||||||
else {
|
else {
|
||||||
config->trace_stream = fopen(config->trace_dump, "w");
|
config->trace_stream = fopen(config->trace_dump, "w");
|
||||||
config->trace_fopened = TRUE;
|
config->trace_fopened = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user