Commit Graph

21 Commits

Author SHA1 Message Date
tearfur 5ec4ca550e
chore: iwyu (#5746) 2023-07-08 10:24:03 -05:00
Mike Gelfand 57e6b06921
Modernize CMake code (ongoing refactoring) (#4515)
* Use imported CMake target for CURL

* Use imported CMake target for fmtlib

* Use imported CMake target for WideInteger

* Use imported CMake target for FastFloat

* Use imported CMake target for UtfCpp

* Use imported CMake target for Threads

* Use imported CMake target for Iconv

* Use imported CMake target for crypto backend

* Use imported CMake target for GTK

* Use imported CMake target for Qt

* Use imported CMake target for deflate

* Use imported CMake target for libevent

* Use imported CMake target for natpmp

* Use imported CMake target for miniupnpc

* Use imported CMake target for dht

* Use imported CMake target for psl

* Use imported CMake target for libutp

* Use imported CMake target for libb64

* Use include directories from libtransmission target
2023-01-02 16:23:51 +00:00
Charles Kerr 8a35aa0903
refactor: add tr_rand_obj() (#4238)
* refactor: add tr_rand_obj()

There are a lot of places in the codebase where we need to populate
an integral type or a fixed-size array with random data. To do this,
we instantiate a local on the stack, fill it with tr_rand_buffer(),
and then use it.

This PR creates a helper function to make this a one-liner.
2022-11-25 15:04:37 -06:00
Charles Kerr 89d6533cd7
build: support semver versioning (#3867)
* build: semver versioning

Xref: https://github.com/transmission/transmission/issues/1037

* test: add base62 tests for client-id

* build: include PATCH_VERSION in Transmission.rc.in

* build: semver versioning in version.h

* fixup! build: semver versioning in version.h

undo experimental verison changes that were made for testing purposes

* Fixup version in MSI package filename

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-10-05 16:53:10 -05:00
L2501 4977c1a02f
add clientIDs for BitTorrent Web, Free Download Manager 6, Torch Browser (#3838) 2022-09-22 16:55:51 -05:00
L2501 22669dda5e
Add Advanced Download Manager & LibreTorrent client names (#3750) 2022-09-02 12:37:25 -05:00
Charles Kerr 83ffa6bf1b
chore: fix spdx abbreviations (#3602) 2022-08-08 13:05:39 -05:00
Charles Kerr 3ed6b187bb
refactor: iwyu utils.h (#3583) 2022-08-04 08:44:18 -05:00
Charles Kerr 1a0afbe95e
refactor: iwyu (#3525) 2022-07-25 21:45:54 -05:00
Charles Kerr 4a2a6b2985
test: use uniform naming scheme for fuzz tests. (#2928)
Use case: libtransmission-test --gtest_filter='*Fuzz' --gtest_repeat N
2022-04-16 11:47:51 -05:00
Charles Kerr eb33b2faf5
fix: tr_clientForId() (#2887)
* fix: memory corruption when parsing negative numbers

* fix: stack-buffer-overflow on escape chars in tr_clientForId

* test: add tr_clientForId() fuzz tests
2022-04-06 12:06:11 -05:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 2c09e99515
fix: parse utorrent peer-id version components as hex (#2411) 2022-01-16 10:27:23 -06:00
Charles Kerr 94ee81f98d
fixup! refactor: add tr_peer_id_t (#2004) (#2016)
fix: array bounds read error introduced yesterday
2021-10-22 15:24:30 -05:00
Charles Kerr 1ba64684f9
refactor: C++ify clients.cc (#1907)
* refactor: use C++17 for clients.cc
2021-10-08 21:46:10 -05:00
Mark Deepwell d57f575892
Retain full BitLord build number 2021-04-27 20:47:37 -07:00
Mark Deepwell 7ff6d8cf36
Add unrecognized client names #1363
This is based off of PR#1526 by azy5030 to add in: Torrent Web, BiglyBT, and FrostWire. I made the additional change requested by livings124.

In addition this also adds support for: HTTP Seed, aria2 (#532), and BitLord.
2021-04-27 20:47:33 -07:00
Charles Kerr ce51f1adbf
refactor: work around msvc constxpr std::array bug (#1429)
The tests FTBFS on the latest version of MSVC because it has a regression
that crashes the compiler when it sees a constexpr std::array. This commit
can be reverted when MSVC releases a fix.

https://developercommunity.visualstudio.com/content/problem/1139953/167-regression-auto-constexpr-with-deduced-array-i.html
2020-09-07 19:33:36 -05:00
Charles Kerr 9f7c865454
refactor: don't store torrent hashes in QStrings (#1428)
* refactor: keep torrent hash in std::array<char,20>

This replaces the hashString QString allocation with a compile-time
array that's included in sizeof the Torrent struct that owns it.
2020-09-07 16:19:10 -05:00
Berbe 8445e090a7
Fix: Test structure shadowing Google Test suite one (#1417)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2020-09-07 13:52:05 -05:00
Charles Kerr 677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00