transmission/libtransmission
Charles Kerr 098c7508e3
fix: clang nullptr dereference warning in utils.cc (#1797)
We know what strings are passed into tr_strip_positional_args(). Instead
of using dynamic allocation, use a fixed-size array that's big enough to
fit the strings that we have.
2021-09-13 08:45:01 -05:00
..
CMakeLists.txt refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
ConvertUTF.c
ConvertUTF.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
README.md refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
announcer-common.h perf: prioritize announces based on scrape stats (#1782) 2021-09-09 19:28:22 -05:00
announcer-http.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
announcer-udp.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
announcer.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
announcer.h perf: use scrape to know when a private swarm is all-seeds (#1780) 2021-09-09 15:25:30 -05:00
bandwidth.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
bandwidth.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
bitfield.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
bitfield.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
blocklist.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
blocklist.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
cache.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
cache.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
clients.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
clients.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
completion.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
completion.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
crypto-utils-cyassl.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto-utils-fallback.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto-utils-openssl.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto-utils-polarssl.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto-utils.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto-utils.h Switch to a standalone ARC4 implementation (#1788) 2021-09-12 06:47:29 +03:00
crypto.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
crypto.h Switch to a standalone ARC4 implementation (#1788) 2021-09-12 06:47:29 +03:00
error-types.h
error.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
error.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
fdlimit.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
fdlimit.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
file-posix.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
file-win32.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
file.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
file.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
handshake.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
handshake.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
history.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
history.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
inout.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
inout.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
jsonsl.c chore: update jsonsl parser snapshot (#1050) 2019-11-09 18:06:36 -06:00
jsonsl.h chore: update jsonsl parser snapshot (#1050) 2019-11-09 18:06:36 -06:00
libt.dox
list.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
list.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
log.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
log.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
magnet.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
magnet.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
makemeta.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
makemeta.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
metainfo.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
metainfo.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
mime-types.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
mime-types.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
mime-types.js feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
natpmp.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
natpmp_local.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
net.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
net.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
peer-common.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
peer-io.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
peer-io.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
peer-mgr.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
peer-mgr.h perf: use scrape to know when a private swarm is all-seeds (#1780) 2021-09-09 15:25:30 -05:00
peer-msgs.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
peer-msgs.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
peer-socket.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
platform-quota.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
platform-quota.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
platform.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
platform.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
port-forwarding.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
port-forwarding.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
ptrarray.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
ptrarray.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
quark.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
quark.h configure anti brute force (#1447) 2020-11-14 12:43:42 -06:00
resume.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
resume.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
rpc-server.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
rpc-server.h configure anti brute force (#1447) 2020-11-14 12:43:42 -06:00
rpcimpl.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
rpcimpl.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
session-id.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
session-id.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
session.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
session.h perf: lookup tables for faster torrent searching. (#1778) 2021-09-09 00:22:29 -05:00
stats.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
stats.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
subprocess-posix.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
subprocess-win32.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
subprocess.h refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
torrent-ctor.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
torrent-magnet.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
torrent-magnet.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
torrent.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
torrent.h perf: faster tr_sessionCountQueueFreeSlots() (#1785) 2021-09-10 15:15:35 -05:00
tr-assert.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-assert.h
tr-dht.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-dht.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
tr-getopt.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-getopt.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
tr-lpd.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-lpd.h chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
tr-macros.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
tr-udp.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-udp.h
tr-utp.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-utp.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
transmission.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
trevent.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
trevent.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
upnp.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
upnp.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
utils.cc fix: clang nullptr dereference warning in utils.cc (#1797) 2021-09-13 08:45:01 -05:00
utils.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
variant-benc.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
variant-common.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
variant-json.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
variant.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
variant.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
verify.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
verify.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
version.h.in Adjust CFBundleVersion format to fix Sparkle update check 2018-04-17 13:25:49 +03:00
watchdir-common.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
watchdir-generic.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
watchdir-inotify.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
watchdir-kqueue.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
watchdir-win32.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
watchdir.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
watchdir.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
web.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
web.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
webseed.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
webseed.h Ensure include guard is the first non-comment line 2017-11-14 23:21:28 +03:00
wildmat.c

README.md

Notes on the C-to-C++ Conversion

  • libtransmission was written in C for fifteen years, so eliminating all Cisms is nearly impossible. Modernization patches are welcomed but it won't all happen overnight. tr_strdup() and constexpr wil exist side-by-side in the codebase for the forseeable future.

  • It's so tempting to refactor all the things! Please keep modernization patches reasonably focused so that they will be easy to review.

  • Prefer std:: tools over bespoke ones. For example, use std::vector instead of tr_ptrArray. Redundant bespoke code should be removed.

  • Consider ripple effects before adding C++ into public headers. Will it break C code that #includes that header?