Commit Graph

22 Commits

Author SHA1 Message Date
Charles Kerr 46eb379205
fix: ESPIPE "illegal seek" error while seeding (#3137)
* fix: ESPIPE "illegal seek" error while seeding

The root cause is createSocket returning `{}` instead of `TR_BAD_SOCKET`
when we have too many peers in use. This defaulted to fd 0, which wound
up closing stdin.

Commit also includes some const-correctness changes made while tracking
the problem down.
2022-05-25 18:16:15 -05:00
Charles Kerr 41cb8cbc91
refactor: add tr_address.readable (#2962) 2022-04-21 18:37:02 -05:00
Charles Kerr 32f854a7cf
refactor: add a tr_port safety class (#2952) 2022-04-21 10:58:13 -05:00
Charles Kerr 205abbbcce
refactor: iwyu string, vector, cstdint (#2898)
* refactor: use cstdint for intX_t types

* refactor: iwyu sstring_view

* refactor: iwyu <cstring>

* refactor: iwyu <vector>
2022-04-07 20:50:26 -05:00
Charles Kerr fa8aaf7631
refactor: remove remaining vararg log messages (#2776) 2022-03-17 17:39:06 -05:00
Charles Kerr 54ef7341a2
refactor: fmt pt 4 (#2774)
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-16 19:23:44 -05:00
Charles Kerr 72a67054ea
refactor: fmt part 2 (#2771) 2022-03-15 09:52:16 -05:00
Charles Kerr af339a15ed
refactor: remove deep logging (#2749)
* refactor: remove "deep logging"
2022-03-09 23:51:14 -06:00
Charles Kerr e94ddc82fc
refactor: use std::string in tr_net_strerror() (#2706) 2022-02-24 18:53:01 -06:00
Charles Kerr 9688e3ca1e
refactor/remove-unused-utp-includes (#2650) 2022-02-18 18:56:53 -06:00
Charles Kerr 6383e2ff5f
feat: support dscp classes in socket iptos (#2594)
* refactor: Replace ToS with DSCP

IP TOS was superseded by DSCP in RFC 2474.

Co-authored-by: dgcampea <dgcampea@outlook.com>
2022-02-10 15:35:28 -06:00
Charles Kerr ecef0feb0c
refactor: clang-tidy in libtransmission (#2578)
* chore: enable cppcoreguidelines-slicing warning

* chore: enable readability-named-parameter warning

* chore: enable bugprone-reserved-identifier check

* chore: enable bugprone-not-null-terminated-result check

* chore: enable bugprone-sizeof-expression check

* chore: enable bugprone-incorrect-roundings check

* chore: enable misc-misplaced-const check

* chore: enable bugprone-suspicious-include check

* chore: enable bugprone-signed-char-misuse check

* chore: enable modernize-raw-string-literal check

* chore: enable readability-static-accessed-through-instance check

* chore: enable readability-implicit-bool-conversion check

* fixup! Merge branch 'main' into refactor/clang-tidy
2022-02-06 22:28:36 -06:00
Charles Kerr 2d916ab9a8
fixup! Fixed wrong ipv6 addr used in announces. (#265) (#2464)
fix unused variable warning
2022-01-20 16:34:43 -06:00
vuori a89b98f9e5
Fixed wrong ipv6 addr used in announces. (#265) 2022-01-20 15:28:04 -06:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 3d38e01a13
refactor: tr_session.congestion (#2151)
* refactor: tr_session.congestion
2021-11-14 00:41:44 -06:00
Dan Walters 8234d064a8
fix: apply optional peer socket TOS to UDP sockets (#1043)
This effectively makes the TOS setting apply to uTP and DHT traffic.

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-26 20:59:31 -05:00
Charles Kerr a127826d76
refactor: cppcoreguidelines-init-variables pt. 11 (#2012)
* refactor: uninit vars in bandwidth.cc

* refactor: uninit vars in cache.cc

* refactor: uninit vars in fdlimit.cc

* refactor: uninit vars in inout.cc

* refactor: uninit vars in platform.cc

* refactor: uninit vars in log.cc

* refactor: uninit vars in tr-utp.cc

* refactor: uninit vars in stats.cc

* refactor: uninit vars in trevent.cc

* refactor: uninit vars in session-id.cc

* fixup! refactor: uninit vars in cache.cc

* refactor: uninit vars in upnp.cc

* refactor: uninit vars in file.cc

* refactor: uninit vars in tr-lpd.cc

* refactor: uninit vars in tr-udp.cc
2021-10-23 10:43:15 -05:00
Charles Kerr 16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers (#1980) 2021-10-17 15:17:18 -05:00
Charles Kerr 1fb5a79813
refactor: use maybe unused attribute (#1918)
* refactor: replace TR_UNUSED with [[maybe_unused]]
2021-10-10 11:52:26 -05:00
Dmytro Lytovchenko 43d1ece562
C++ modernization: Replace NULLs with typesafe nullptrs (#1799)
Fixing CI errors and build errors
Reverted changes: NULL in EV_SET macro; Clang-formatting
Reverted changes: MacosX *.m files reverted from master
2021-09-14 19:18:09 -05:00
Charles Kerr 4c1b627647
refactor: port libtransmission to C++ (#1787)
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization 
patches!

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Renamed from libtransmission/tr-udp.c (Browse further)