Skip to content

Commit

Permalink
Disable --aggressive-networking if --maxbw-rate-*
Browse files Browse the repository at this point in the history
The --aggressive-networking option is incompatible with the
--maxbw-rate-* options; formerly tarsnap treated this combination
as an error, but with this commit it instead prints a warning and
turns off aggressive networking.  This is useful if, for example,
aggressive networking is enabled in a configuration file but the
user specifies maxbw-rate options at the command line.

Closes:		#15
  • Loading branch information
cperciva committed Aug 6, 2015
1 parent 58ea6e2 commit 9478f36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tar/bsdtar.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,11 @@ main(int argc, char **argv)
if (tarsnap_opt_aggressive_networking != 0) {
if ((bsdtar->bwlimit_rate_up != 0) ||
(bsdtar->bwlimit_rate_down != 0)) {
bsdtar_errc(bsdtar, 1, 0,
bsdtar_warnc(bsdtar, 0,
"--aggressive-networking is incompatible with"
" --maxbw-rate options");
" --maxbw-rate options;\n"
" disabling --aggressive-networking");
tarsnap_opt_aggressive_networking = 0;
}
}

Expand Down

0 comments on commit 9478f36

Please sign in to comment.