Commit Graph

1320 Commits

Author SHA1 Message Date
kannibalox e0d5c95821 Use correct terminology in comment 2024-11-25 18:44:28 +09:00
kannibalox 7f4c5df5ee Use single namespace statement 2024-11-25 18:44:28 +09:00
kannibalox dd45684584 Move vendored tinyxml2 files to rpc namespace and directory 2024-11-25 18:44:28 +09:00
kannibalox fb8632e990 Change lingering camelCase to snake_case 2024-11-25 18:44:28 +09:00
kannibalox b043b7b39e Simplify iterator names 2024-11-25 18:44:28 +09:00
kannibalox 168093d256 Remove extra return 2024-11-25 18:44:28 +09:00
kannibalox 0c2f0b7715 Add test case for invalid floats 2024-11-25 18:44:28 +09:00
kannibalox 4a9d9952e1 Be explicit about the desired result 2024-11-25 18:44:28 +09:00
kannibalox fd1d5dbdb2 Add test case for bad boolean value 2024-11-25 18:44:28 +09:00
kannibalox dd0c62c7f7 Uncomment after testing 2024-11-25 18:44:28 +09:00
kannibalox 3a8e462bd3 Throw error if attempting to use both xmlrpc-c and tinyxml2 2024-11-25 18:44:28 +09:00
kannibalox b360a734f1 Use std::strtoll instead of std::stol 2024-11-25 18:44:28 +09:00
kannibalox c18df7a366 Use std::strncmp for string comparison 2024-11-25 18:44:28 +09:00
kannibalox a269f808e1 Fix swapped variable names 2024-11-25 18:44:28 +09:00
kannibalox 4444df2e97 Change internal error to type error 2024-11-25 18:44:28 +09:00
kannibalox 5a194ab037 Remove stack from exception message 2024-11-25 18:44:28 +09:00
kannibalox 1b43f8b591 Use snake case for variable names
Also use `||` instead of `or`, and throw an error if an unknown boolean
string is received
2024-11-25 18:44:28 +09:00
kannibalox d6427203a4 Refactor to only use a position variable 2024-11-25 18:44:28 +09:00
kannibalox 87c6422052 Allow using vendored tinyxml2 for XMLRPC
By default, builds will still not have XMLRPC enabled at all and the
configure flag `--with-xmlrpc-tinyxml2` must be specified. If both
xmlrpc-c and tinyxml2 are specified, xmlrpc-c takes precedence.

Basic benchmarks indicate tinyxml2 is 2x faster for small
requests/responses, and that only increases as response sizes get
larger.
2024-11-25 18:44:28 +09:00
rakshasa 6ab265ecd4 Fixed merge errors. 2024-11-14 00:33:03 +09:00
rakshasa 203c66a287 Merge branch 'kannibalox-feature/clang-format' 2024-11-13 10:53:28 +00:00
Jari Sundell c9fe2facfa Merge branch 'master' into feature/clang-format 2024-11-13 19:51:04 +09:00
kannibalox 5abcf52e55 Remove unused flag_delete_key 2024-11-13 19:22:34 +09:00
kannibalox f2f84dd97a Remove destructor definition entirely 2024-11-13 19:22:34 +09:00
kannibalox 34de2b4ac9 Convert CommandMap to use std::string instead of char*
This allows it to own its keys and clean them up automatically on
destruction.
2024-11-13 19:22:34 +09:00
rakshasa ef937863fd Removed unused code. 2024-11-13 18:59:57 +09:00
kannibalox 00fa4127e1 Respect existing line limits 2024-11-11 16:00:28 -05:00
kannibalox 1b0cb722e6 Remove non-naming checks 2024-11-10 09:18:59 -05:00
kannibalox af23ca8032 Convert some representative files 2024-11-10 09:17:12 -05:00
kannibalox c85f9d6318 Add clang tidy/format 2024-11-10 09:08:33 -05:00
Josh Ellithorpe ee120730cc Update README.md to spell Ethereum correctly 2024-10-29 22:44:09 +09:00
stickz b284be6a66 Resolve scgi software crash
This commit resolves a scgi software crash when the scgi socket is closed before the message can be sent. It instructs `::send()` not to send a SIGPIPE termination signal. Instead the value -1 is returned and handled bellow. The SCgiTask is closed and a new one is sent to complete the task.

```
Thread 3 "rtorrent scgi" received signal SIGPIPE, Broken pipe.
                                                             [Switching to Thread 0x7fffe635c6c0 (LWP 2443872)]
0x00007ffff7929a84 in send () from /lib/x86_64-linux-gnu/libc.so.6
```
2024-10-29 22:42:33 +09:00
kannibalox 6e976616a0 Simplify updating queue entries
The erase/insert pattern can be replaced by a single method that
updates an existing entry's timer, or inserting if it doesn't exist.

This has much less impact than the libtorrent change it's based on,
but might as well be consistent.
2024-10-20 18:33:33 +09:00
Adam Sampson 38b39bdafc Add ax_require_defined.m4 to scripts.
This is required now by ax_with_curses.m4, but wasn't added when the
script was updated.
2024-10-07 23:52:20 +09:00
Adam Sampson 48718bdac8 Remove unnecessary +x mode from some m4 files. 2024-10-07 23:52:20 +09:00
Rui Chen 5ce84929e4 fix: use fsync for osx builds
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-10-07 23:43:54 +09:00
stickz c1d076f182 Fixing static building
@rakshasa A major hosting provider with rTorrent has mentioned the following revision is required for static builds to pass.
2024-10-07 23:32:45 +09:00
Jari Sundell f929594763 Update README.md 2024-09-29 23:34:31 +09:00
rakshasa a88cab6d2e Released v0.9.0. v0.10.0 2024-09-29 11:06:14 +00:00
rakshasa 9a93281ded Merge branch 'stickz-session-fix' 2024-09-07 08:29:22 +00:00
rakshasa 133ce36570 Fixed goto warning. 2024-09-07 08:29:00 +00:00
rakshasa a142301d02 Merge branch 'session-fix' of github.com:stickz/rtorrent-rak into stickz-session-fix 2024-09-07 08:17:07 +00:00
rakshasa f04e512887 Merge branch 'stickz-memory-leak' 2024-09-07 08:02:55 +00:00
rakshasa d32d59315d Merge branch 'memory-leak' of github.com:stickz/rtorrent-rak into stickz-memory-leak 2024-09-07 07:54:00 +00:00
rakshasa 86e85ae485 Merge branch 'stickz-lto-fix' 2024-09-07 06:29:21 +00:00
stickz 6e9902c23b Fix critical memory leak
This commit fixes a critical memory leak with the inserting RPC commands. We must initialize the cmd_flags with the delete key, otherwise they hang around in memory forever; potentially leaking significant amounts of resources.
2024-09-06 11:16:47 -04:00
stickz d4427931a2 Fix session file data corruption
From https://github.com/jesec/rtorrent/commit/f9a875b633eb083ec82f89ebeae8678ca424e8b2

This commit ensures session files land on the disk in the event of a system crash or power outage. It prevents data corruption of rTorrent session files, which causes torrent client breakage.

Optimizations from the initial implementation include
1) Skipping unnecessary file metadata updates during the sync process.
2) Skipping variable initialization since open will assign -1 on failure.
2024-09-06 11:05:35 -04:00
stickz ea3828a17e Fix Link Time Optimizations
This commit fixes compiling rTorrent with LTO (Link Time Optimizations). We just need to rename from variables in the directory_entry structure to avoid ODR and ZLIB conflicts.
2024-09-01 08:20:01 -04:00
rakshasa 4e246a401f Remove decision structure for popcount_wrapper
The decision structure is very costly. It's significantly faster to work with long long than to use it.
2024-08-31 12:14:50 +00:00
rakshasa eacf9798e2 commit 30addc1a5e
Author: kannibalox <kannibalox@gmail.com>
Date:   Mon Jun 10 13:09:29 2024 -0400

    Use regular iterators intead of bucket-local ones

    Trying to manually predict which bucket a hashed key will land in does not
    appear to be well-defined behavior.

    Fixes #1285
2024-08-20 17:56:03 +00:00