Fixed xmlrpc-c build errors and added better github workflow for unit-tests.

This commit is contained in:
Jari Sundell
2026-06-04 10:16:47 +02:00
committed by GitHub
parent a5a96236df
commit cc15e9308a
2 changed files with 66 additions and 30 deletions
+3 -3
View File
@@ -278,7 +278,7 @@ object_to_xmlrpc(xmlrpc_env* env, const torrent::Object& object) {
case torrent::Object::TYPE_STRING:
{
if (object.flags() & torrent::Object::flag_binary) {
if (object.flags() & torrent::Object::flag_as_binary) {
// This causes decode-and-reencode for base64, as XMLRPC-C doesn't allow us to pass base64 strings.
if (object.flags() & torrent::Object::flag_base64) {
@@ -287,10 +287,10 @@ object_to_xmlrpc(xmlrpc_env* env, const torrent::Object& object) {
if (!binary_data.has_value())
throw torrent::input_error("invalid base64 string in base64-as-binary object");
return xmlrpc_base64_new(env, (const char*)binary_data->data(), binary_data->size());
return xmlrpc_base64_new(env, binary_data->size(), reinterpret_cast<const unsigned char*>(binary_data->data()));
}
return xmlrpc_base64_new(env, object.as_string().c_str(), object.as_string().size());
return xmlrpc_base64_new(env, object.as_string().size(), reinterpret_cast<const unsigned char*>(object.as_string().c_str()));
}
#ifdef XMLRPC_HAVE_I8