Commit Graph

13477 Commits

Author SHA1 Message Date
Mike Gelfand dab4857f90
Merge branch 'master' into rmintltool 2019-02-24 21:52:09 +03:00
Charles Kerr 3cf3d6a22a
widen the torrent-id column for cleaner formatting (#840)
Under the current code, if there are over 9,999 torrents the
format will shift over one space when bumping from 9999 to 10000.
2019-02-18 22:39:02 +00:00
Charles Kerr 309d97c578
fix: Coverity warnings (#842)
* Silence coverity CHECKED_RETURN on added.f load

The existing code behaved alright since added.f is optional.
However, by testing for success we can both silence the warning
and prevent a useless initialization of NULL/0 to added_f and
added_f_length.

* Silence coverity CHECKED_RETURN on added6.f load

ipv6 variant of previous commit.

* Silence coverity CHECKED_RETURN writing benc strs

saveStringFunc() gets the target string by calling tr_variantGetStr().
It previously didn't check to see if this function succeeded because
saveStringFunc() isn't reached without the type already being known.
However, checking the return value costs nothing and makes Coverity happy.

* Silence coverity CHECKED_RETURN on ut metadata

Like earlier few Coverity commits in this PR, we're handling optional
values by declaring stack locals set to the default (e.g. -1) and then
trying to read the variant.

Unlike the earlier commits, there is a two-part step to thise read:
checking for the metadata, then checking for the individual fields.
The earlier fixes' aproach -- e.g. initializing to -1 only if the reads
failed -- would involve new nested conditionals. I find the new complexity
to outweigh the benefit of removing the dead store, so in this case I'm
casting the return value to `(void)` to tell Coverity to shush.

* Silence coverity CHECKED_RETURN on scrape

Check the return value of tr_variantGetInt() when showing
seeder and leecher counts in transmission-show.

* Silence CHECKED_RETURN on rpc recently-active

When building a list of removed torrent IDs from variants, confirm that
we can read the IDs from the variants before adding them to the list.
I don't _think_ this would have failed before, but Coverity's right that
it's reasonable to add a safeguard here.

* fix: better fix to serializing benc strings

The approach in 33e2ece7e5 was
a little problematic: GetString() shouldn't fail here; but if
it somehow did, we still want to encode a zero-length benc string here.

* chore: make uncrustify happy
2019-02-18 22:38:24 +00:00
Mike Gelfand 3ba0b9df15 Fixup some formatting leftovers (JS) 2019-02-17 17:51:13 +03:00
qu1ck 7aa12a025d Add labels feature (#822)
* applied changes from https://github.com/Elbandi/transmission/tree/elbandi/labels to official transmission repo

* Fix compilation errors

* Address review comments

Changed `tr_ptrArray* labels` to `tr_ptrArray labels`;
Removed tr_ptrArrayNew() tr_ptrArrayDup() tr_ptrArrayFree()
Use tr_strsep() to split string by delimiters
Update transmission-remote.1
Update rpc-spec.txt

* Fix warning, address comments

* Rebase, fix formatting and address comments

Use uncrustify to format changed files
Fix "const <type>" -> "<type> const"
Fix small comments

* Lock torrent for setLabels, check for duplicates

* Check for empty labels in daemon

* Stop on first error
2019-02-17 04:33:57 -05:00
Charles Kerr 2013772aad
feat: make multiscrape limits adaptive (#837)
* feat: make multiscrape limits adaptive

Previously hardcoded by TR_MULTISCRAPE_MAX. This change makes
that the initial value, then incrementally lowers the value
when multiscrapes get "req too long" style errors.

* fix: don't log personal announce url

* chore: treat HTTP 400 as scrape-too-long

* chore: copyediting

* chore: copyediting

* move 'const' to the right of the type

* make conditional tests explicitly boolean

* make 'key' const

* don't lookup a value we already have

* make an array for known too-big scrape error messages

* improved multiscrape throttle logging

* fix: multiscraping of low numbers of torrents

Handle the case of getting a 'multiscrape too big' error message
back even if the user fewer than TR_MULTISCRAPE_MAX torrents.

* uncrustify

* fix oops

* refactor: remove TR_MULTISCRAPE_MIN

Is there any reason to have a minimum batch size?

* make test explicit boolean

Co-Authored-By: ckerr <ckerr@github.com>

* improve declaration of too_long_errors

Co-Authored-By: ckerr <ckerr@github.com>

* make test explicitly boolean

Co-Authored-By: ckerr <ckerr@github.com>

* make test explicitly boolean

Co-Authored-By: ckerr <ckerr@github.com>

* improve looping decl of too_long_errors
2019-02-16 15:19:38 -05:00
Mike Gelfand 1d6d946388 Fixup some formatting leftovers 2019-02-16 10:50:37 +03:00
Mike Gelfand 875fd654d8
Merge pull request #838 from transmission/uncrustify-update
Update to Uncrustify 0.68.1
2019-02-15 09:29:11 +03:00
Mike Gelfand 82df3a87f4 Update to Uncrustify 0.68.1
Tweak a few rules in the process. Now all code in cli, daemon, gtk,
libtransmission, qt, and utils is properly formatted with no manual
intervention.
2019-02-15 09:21:48 +03:00
Charles Kerr c019317548
Merge pull request #825 from transmission/update-resume-file-before-invoking-torrent-scripts
fix: update the resume file before running scripts
2019-02-10 12:27:00 -10:00
Mitch Livingston a89f33d7dc
Merge pull request #826 from Coeur/QuickLookPluginPath
Fix QuickLookPlugin reference path to be relative to group
2019-02-06 21:07:39 -05:00
Charles Kerr 39d1a54fbd
Merge branch 'master' into update-resume-file-before-invoking-torrent-scripts 2019-02-06 02:00:47 -05:00
Antoine Cœur 34324a2d80 Fix QuickLookPlugin reference path to be relative to group 2019-02-03 10:49:06 +08:00
Charles Kerr 5082393d92 address dirty/save sequencing issue in prev commit 2019-02-02 14:49:53 -06:00
Charles Kerr b04f2df299
Merge pull request #741 from Artoria2e5/parseline-cidr
Support CIDR-notated blocklists
2019-02-01 23:38:48 -06:00
Charles Kerr 7058f37bed
Merge pull request #816 from PeterDaveHello/improve-shellscript
fix shell script syntax errors and spacing inconsistencies
2019-02-01 22:36:54 -06:00
Charles Kerr a89ebdeef3
Merge pull request #795 from jelly/systemd_hardening
daemon: harden transmission-daemon.service
2019-02-01 22:25:46 -06:00
Charles Kerr 322c30d991
Merge pull request #767 from takiz/transm_show
Add option "--unsorted" for transmission-show
2019-02-01 22:09:37 -06:00
Charles Kerr d08189ae21
Merge pull request #807 from fetzu/master
Updated copyright strings to 2019
2019-02-01 22:04:43 -06:00
Charles Kerr 8a6f203215
Merge pull request #811 from louib/cli_manpage_typo
Fix typo in CLI manpage.
2019-02-01 22:03:28 -06:00
Charles Kerr 08f5a0fdaa fix: update the resume file before running scripts
This is useful if the client script is going to access
the .resume file. Ensuring an up-to-date .resume file
means that user scripts will be able to access it.
2019-02-01 21:59:17 -06:00
Peter Dave Hello 7a0d2e63c7 Refactor shell scripts with syntax and styling fixes 2019-01-16 03:22:29 +08:00
louib 59cb2d323c Fix typo in CLI manpage. 2019-01-13 15:18:51 -05:00
fetzu 3c0cb395c5 Updated copyright strings to 2019
Updated Transmission Project copyright dates to 2005-2019 in headers and code.
2019-01-11 19:36:19 +01:00
Jelle van der Waa d1d060c3a9 daemon: harden transmission-daemon.service
Systemd 227 introduced the option to make a service disallow elevating
privileges.
2018-12-28 22:47:16 +01:00
Mitchell Livingston 4a4233feae Update some selector-based alerts to block-based 2018-12-26 10:15:33 -05:00
Mitchell Livingston 7b815b766c More dark mode fixes 2018-12-26 09:37:03 -05:00
Mitchell Livingston 944876de23 add Sparkle update to NEWS 2018-12-24 19:00:29 -05:00
Mitchell Livingston 8b386186e2 missed one 2018-12-24 18:57:23 -05:00
Mitchell Livingston 902ab9a800 Update Sparkle to 1.21.2 2018-12-24 18:57:10 -05:00
Mitchell Livingston 8ba329d07b Start of updating NEWS for 3.00 2018-12-24 18:46:15 -05:00
Mitchell Livingston 0cbf62411b Enable hardened runtime 2018-12-21 20:15:46 -05:00
Mitchell Livingston adedcf0ff0 Don't have a background on group rules 2018-12-21 18:04:03 -05:00
Mitchell Livingston a1055838e3 On 10.14, use the accent color for the selected info tab 2018-12-21 17:58:15 -05:00
Mitchell Livingston 47cbb898f8 Update the info tab on appearance change 2018-12-21 17:37:17 -05:00
Mitchell Livingston daf6a9d307 Proper dark mode for group rules sheet 2018-12-21 17:14:44 -05:00
Mitchell Livingston d2b3010210 Dark mode support
This is the first pass. A bit more work is needed.
2018-12-21 16:39:47 -05:00
Mitchell Livingston d5dc5d1a24 Update project.pbxproj
Bump minimum version to 10.10
2018-12-21 16:20:13 -05:00
takiz 21291d8609 Add option "--unsorted" for transmission-show 2018-11-19 15:35:32 +05:00
Mike Gelfand 4671276450 Move transmission-remote to utils (Xcode) 2018-11-13 01:38:43 +03:00
Mike Gelfand 204e9b04f5 Move transmission-remote to utils 2018-11-06 20:10:10 +00:00
Mike Gelfand f4dc55f87b
Merge pull request #673 from rahimnathwani/master
Update README with missing 'cd build' command
2018-10-20 18:06:51 +01:00
Mitch Livingston 41bf3d2690
Merge pull request #744 from ilyamodder/master
Fix typo in macOS Russian localisation
2018-10-19 07:31:22 -04:00
Mingye Wang 847b43ffd3 (squash later) test rule count 2018-10-17 10:26:05 -04:00
Mingye Wang 94ee776113 (squash later) blocklist cidr endianness 2018-10-17 09:41:19 -04:00
Ilya Chirkov c3bee045e1
Fix typo 2018-10-16 21:11:58 +03:00
Mingye Wang f61306f65f (squash later) fix pflen handling in cidr 2018-10-14 12:44:01 -04:00
Mingye Wang b3129591db Support CIDR-notated blocklists
This commit adds a new blocklist line format, namely individual IPv4
CIDR ranges separated by newlines. Text put after each entry is ignored
by sscanf, so feel free to put any kind of comments there.

Fix #230.
2018-10-13 17:23:45 -04:00
Mike Gelfand 24473c9487
Merge pull request #609 from t-richards/bugfix/show-invalid-date
transmission-show: Prevent crash with invalid creation date
2018-10-06 22:43:12 +01:00
Mike Gelfand 56d5f117a8 Refactor "created on" value output a bit further
This eliminates partial string literal duplication but is otherwise
equivalent to the prior code.
2018-10-07 00:26:16 +03:00