Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
5577540a
Commit
5577540a
authored
11 years ago
by
Steve Holme
Browse files
Options
Downloads
Patches
Plain Diff
tool: Moved --silient to the global config
Other global options such as --libcurl, --trace and --verbose to follow.
parent
17df2d8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/tool_cfgable.h
+1
-1
1 addition, 1 deletion
src/tool_cfgable.h
src/tool_getparam.c
+2
-2
2 additions, 2 deletions
src/tool_getparam.c
src/tool_msgs.c
+1
-1
1 addition, 1 deletion
src/tool_msgs.c
src/tool_operate.c
+6
-5
6 additions, 5 deletions
src/tool_operate.c
with
10 additions
and
9 deletions
src/tool_cfgable.h
+
1
−
1
View file @
5577540a
...
...
@@ -87,7 +87,6 @@ struct OperationConfig {
bool
sasl_ir
;
/* Enable/disable SASL initial response */
bool
proxytunnel
;
bool
ftp_append
;
/* APPE on ftp */
bool
mute
;
/* don't show messages, --silent given */
bool
use_ascii
;
/* select ascii or text transfer */
bool
autoreferer
;
/* automatically set referer */
bool
failonerror
;
/* fail on (HTTP) errors */
...
...
@@ -225,6 +224,7 @@ struct GlobalConfig {
int
showerror
;
/* -1 == unset, default => show errors
0 => -s is used to NOT show errors
1 => -S has been used to show errors */
bool
mute
;
/* don't show messages, --silent given */
struct
OperationConfig
*
first
;
struct
OperationConfig
*
current
;
...
...
This diff is collapsed.
Click to expand it.
src/tool_getparam.c
+
2
−
2
View file @
5577540a
...
...
@@ -1619,9 +1619,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case
's'
:
/* don't show progress meter, don't show errors : */
if
(
toggle
)
config
->
mute
=
config
->
noprogress
=
TRUE
;
global
->
mute
=
config
->
noprogress
=
TRUE
;
else
config
->
mute
=
config
->
noprogress
=
FALSE
;
global
->
mute
=
config
->
noprogress
=
FALSE
;
if
(
global
->
showerror
<
0
)
/* if still on the default value, set showerror to the reverse of
toggle. This is to allow -S and -s to be used in an independent
...
...
This diff is collapsed.
Click to expand it.
src/tool_msgs.c
+
1
−
1
View file @
5577540a
...
...
@@ -40,7 +40,7 @@
void
warnf
(
struct
OperationConfig
*
config
,
const
char
*
fmt
,
...)
{
if
(
!
config
->
mute
)
{
if
(
!
config
->
global
->
mute
)
{
va_list
ap
;
int
len
;
char
*
ptr
;
...
...
This diff is collapsed.
Click to expand it.
src/tool_operate.c
+
6
−
5
View file @
5577540a
...
...
@@ -209,6 +209,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
bool
orig_isatty
;
errorbuffer
[
0
]
=
'\0'
;
/* default headers output stream is stdout */
memset
(
&
hdrcbdata
,
0
,
sizeof
(
struct
HdrCbData
));
memset
(
&
heads
,
0
,
sizeof
(
struct
OutStruct
));
...
...
@@ -752,7 +753,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
config
->
isatty
=
orig_isatty
;
}
if
(
urlnum
>
1
&&
!
(
config
->
mute
)
)
{
if
(
urlnum
>
1
&&
!
global
->
mute
)
{
fprintf
(
config
->
errors
,
"
\n
[%lu/%lu]: %s --> %s
\n
"
,
li
+
1
,
urlnum
,
this_url
,
outfile
?
outfile
:
"<stdout>"
);
if
(
separator
)
...
...
@@ -1105,7 +1106,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
progressbarinit
(
&
progressbar
,
config
);
if
((
config
->
progressmode
==
CURL_PROGRESS_BAR
)
&&
!
config
->
noprogress
&&
!
config
->
mute
)
{
!
config
->
noprogress
&&
!
global
->
mute
)
{
/* we want the alternative style, then we have to implement it
ourselves! */
my_setopt
(
curl
,
CURLOPT_XFERINFOFUNCTION
,
tool_progress_cb
);
...
...
@@ -1371,7 +1372,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
#endif
res
=
curl_easy_perform
(
curl
);
if
(
outs
.
is_cd_filename
&&
outs
.
stream
&&
!
config
->
mute
&&
if
(
outs
.
is_cd_filename
&&
outs
.
stream
&&
!
global
->
mute
&&
outs
.
filename
)
printf
(
"curl: Saved to filename '%s'
\n
"
,
outs
.
filename
);
...
...
@@ -1459,7 +1460,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if
(
outs
.
bytes
&&
outs
.
filename
)
{
/* We have written data to a output file, we truncate file
*/
if
(
!
config
->
mute
)
if
(
!
global
->
mute
)
fprintf
(
config
->
errors
,
"Throwing away %"
CURL_FORMAT_CURL_OFF_T
" bytes
\n
"
,
outs
.
bytes
);
...
...
@@ -1469,7 +1470,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
if
(
ftruncate
(
fileno
(
outs
.
stream
),
outs
.
init
))
{
/* when truncate fails, we can't just append as then we'll
create something strange, bail out */
if
(
!
config
->
mute
)
if
(
!
global
->
mute
)
fprintf
(
config
->
errors
,
"failed to truncate, exiting
\n
"
);
res
=
CURLE_WRITE_ERROR
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment