stickz
3c65afcf8c
tinyxml2: Resolve LTO issues
...
We can't have two classes with the same name in the rpc namespace. It causes ODR and lto-type-mismatches when compiling rTorrent with LTO.
This pull request addresses the problem by renaming the `xmlrpc_error` error class to `xmlrpc_error_c` in the xmlrpc_c file.
2024-12-27 00:55:29 +09:00
kannibalox
cd9948a4a8
Remove/replace functional_fun.h functions
2024-12-22 19:17:36 +09:00
stickz
e3be3b2c12
scgi: Fix Apple and Solaris compatibility
...
This is a follow up to #1310 . Apple and Solaris do not support MSG_NOSIGNAL, so disable this flag for these platforms until we find a better solution. Other platforms remain unaffected.
2024-12-14 23:34:48 +09:00
kannibalox
5792ed1ae2
Apply clang-format
2024-12-07 19:26:29 +09:00
kannibalox
8cfc71b936
Fix system.multicall parameter parsing
2024-12-07 19:26:29 +09:00
kannibalox
f33c2560a3
Default to an empty list when not passed explicit <params>
2024-12-07 19:26:29 +09:00
kannibalox
48c40ee0c6
Fix typo: methodReponse -> methodResponse
2024-12-07 19:26:29 +09:00
kannibalox
3aeb213dc4
Avoid <int> in tinyxml2 responses
...
It's part of the XML-RPC spec, but some clients only accept i4/i8, which
should be supported nearly universally.
Fixes #1330
2024-12-07 19:26:29 +09:00
rakshasa
713067ba94
Fixed minor syntax issues.
2024-12-05 04:00:54 +09:00
Jari Sundell
fea2cbfac6
Use proper target namespace
2024-12-05 04:00:54 +09:00
kannibalox
6bf1731a1c
Ensure compability check actually checks the type for files
...
Fixes https://github.com/rakshasa/rtorrent/issues/854
2024-12-05 04:00:54 +09:00
rakshasa
11ddc35d02
Renamed tinyxml2.cpp file.
2024-11-25 18:44:28 +09:00
kannibalox
b3fabd2a2b
Align argument name with header definition
2024-11-25 18:44:28 +09:00
kannibalox
4b7c3ffafe
Use empty() instead of checking size
...
Also use a const pointer for a child element
2024-11-25 18:44:28 +09:00
kannibalox
730d43b6c7
Explicitly mark narrowing conversion
2024-11-25 18:44:28 +09:00
kannibalox
af2f30c183
Remove unused variable
2024-11-25 18:44:28 +09:00
kannibalox
36fd837d27
Fix unnecessary narrowing with proper return type
2024-11-25 18:44:28 +09:00
kannibalox
8dd8d691c5
Explicitly check result of std::strncmp
2024-11-25 18:44:28 +09:00
kannibalox
e367b162ab
Share object_to_target between tinyxml2 and xmlrpc-c
2024-11-25 18:44:28 +09:00
kannibalox
49cdfee65a
Avoid ambiguous value_* in variable names
2024-11-25 18:44:28 +09:00
kannibalox
5680db3598
Parse out target param first if available
2024-11-25 18:44:28 +09:00
kannibalox
fa2c7d961b
Remove unnecessary std::string() and use lowercase for error msgs
2024-11-25 18:44:28 +09:00
kannibalox
d6dcbc4a69
Add size limit to XML-RPC documents, defaulting to max SCGI size
2024-11-25 18:44:28 +09:00
kannibalox
cadfcb50d2
Print iterator for TYPE_DICT_KEY, not object
2024-11-25 18:44:28 +09:00
kannibalox
71a39cd8a0
Keep as_*() outside of loops
2024-11-25 18:44:28 +09:00
kannibalox
0658486966
Change base64 decoder name, and add util for removing newlines
2024-11-25 18:44:28 +09:00
kannibalox
687fbbb83d
Formatting
2024-11-25 18:44:28 +09:00
kannibalox
f9c9fa2e3b
Move int element converter to helper function
...
Also fix strncmp checks
2024-11-25 18:44:28 +09:00
kannibalox
337897784d
Change rpc namespace to include static consts
2024-11-25 18:44:28 +09:00
kannibalox
782b1e4ea8
Skip converting value_element_type to std::string
2024-11-25 18:44:28 +09:00
kannibalox
3cfc213053
Fix missing header
2024-11-25 18:44:28 +09:00
kannibalox
67babb65d6
Convert element_access to use initializer lists
...
Also remove uses element_access for single child accesses
2024-11-25 18:44:28 +09:00
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
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
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
kannibalox
5abcf52e55
Remove unused flag_delete_key
2024-11-13 19:22:34 +09:00