mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-13 18:43:51 +02:00
rtorrent: update to 0.9.8.
This commit is contained in:
parent
b41ae9c080
commit
d65a720d4d
3 changed files with 3 additions and 113 deletions
|
@ -1,76 +0,0 @@
|
||||||
From 1f418366d4e56d96420459ea868a3c23f7c297e8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: chros <chros@chrosGX620>
|
|
||||||
Date: Mon, 1 Oct 2018 23:27:58 +0100
|
|
||||||
Subject: [PATCH] Fix 'list' type method (See #25)
|
|
||||||
|
|
||||||
---
|
|
||||||
src/command_dynamic.cc | 28 +++++++++++++++++++++++-----
|
|
||||||
1 file changed, 23 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git src/command_dynamic.cc src/command_dynamic.cc
|
|
||||||
index 91eb3c46..a8d0ff02 100644
|
|
||||||
--- src/command_dynamic.cc
|
|
||||||
+++ src/command_dynamic.cc
|
|
||||||
@@ -139,6 +139,8 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
|
||||||
case rpc::object_storage::flag_function_type:
|
|
||||||
system_method_generate_command2(&value, itrArgs, args.end());
|
|
||||||
break;
|
|
||||||
+ case rpc::object_storage::flag_list_type:
|
|
||||||
+ break;
|
|
||||||
case rpc::object_storage::flag_multi_type:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
@@ -152,7 +154,17 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
|
||||||
if (!(flags & rpc::object_storage::flag_private))
|
|
||||||
cmd_flags |= rpc::CommandMap::flag_public_xmlrpc;
|
|
||||||
|
|
||||||
- control->object_storage()->insert_str(rawKey, value, flags);
|
|
||||||
+ if ((flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_list_type) {
|
|
||||||
+ torrent::Object valueList = torrent::Object::create_list();
|
|
||||||
+ torrent::Object::list_type& valueListType = valueList.as_list();
|
|
||||||
+
|
|
||||||
+ if ((itrArgs)->is_list())
|
|
||||||
+ valueListType = (itrArgs)->as_list();
|
|
||||||
+
|
|
||||||
+ control->object_storage()->insert_str(rawKey, valueList, flags);
|
|
||||||
+ } else {
|
|
||||||
+ control->object_storage()->insert_str(rawKey, value, flags);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if ((flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_function_type ||
|
|
||||||
(flags & rpc::object_storage::mask_type) == rpc::object_storage::flag_multi_type) {
|
|
||||||
@@ -208,6 +220,13 @@ system_method_insert_object(const torrent::Object::list_type& args, int flags) {
|
|
||||||
&rpc::command_base_call_string<rpc::target_type>,
|
|
||||||
cmd_flags, NULL, NULL);
|
|
||||||
break;
|
|
||||||
+ case rpc::object_storage::flag_list_type:
|
|
||||||
+ rpc::commands.insert_slot<rpc::command_base_is_type<rpc::command_base_call_list<rpc::target_type> >::type>
|
|
||||||
+ (create_new_key<5>(rawKey, ".set"),
|
|
||||||
+ std::bind(&rpc::object_storage::set_str_list, control->object_storage(), rawKey, std::placeholders::_2),
|
|
||||||
+ &rpc::command_base_call_list<rpc::target_type>,
|
|
||||||
+ cmd_flags, NULL, NULL);
|
|
||||||
+ break;
|
|
||||||
case rpc::object_storage::flag_function_type:
|
|
||||||
case rpc::object_storage::flag_multi_type:
|
|
||||||
default: break;
|
|
||||||
@@ -310,10 +329,6 @@ system_method_insert(const torrent::Object::list_type& args) {
|
|
||||||
new_flags = rpc::object_storage::flag_string_type;
|
|
||||||
else if (options.find("list") != std::string::npos)
|
|
||||||
new_flags = rpc::object_storage::flag_list_type;
|
|
||||||
- else if (options.find("simple") != std::string::npos)
|
|
||||||
- new_flags = rpc::object_storage::flag_function_type;
|
|
||||||
- else
|
|
||||||
- throw torrent::input_error("No support for 'list' variable type.");
|
|
||||||
|
|
||||||
if (options.find("static") != std::string::npos)
|
|
||||||
new_flags |= rpc::object_storage::flag_static;
|
|
||||||
@@ -447,6 +462,9 @@ initialize_command_dynamic() {
|
|
||||||
|
|
||||||
CMD2_ANY_LIST ("method.insert", std::bind(&system_method_insert, std::placeholders::_2));
|
|
||||||
CMD2_ANY_LIST ("method.insert.value", std::bind(&system_method_insert_object, std::placeholders::_2, rpc::object_storage::flag_value_type));
|
|
||||||
+ CMD2_ANY_LIST ("method.insert.bool", std::bind(&system_method_insert_object, std::placeholders::_2, rpc::object_storage::flag_bool_type));
|
|
||||||
+ CMD2_ANY_LIST ("method.insert.string", std::bind(&system_method_insert_object, std::placeholders::_2, rpc::object_storage::flag_string_type));
|
|
||||||
+ CMD2_ANY_LIST ("method.insert.list", std::bind(&system_method_insert_object, std::placeholders::_2, rpc::object_storage::flag_list_type));
|
|
||||||
|
|
||||||
CMD2_METHOD_INSERT("method.insert.simple", rpc::object_storage::flag_function_type);
|
|
||||||
CMD2_METHOD_INSERT("method.insert.c_simple", rpc::object_storage::flag_constant | rpc::object_storage::flag_function_type);
|
|
|
@ -1,34 +0,0 @@
|
||||||
From 3d88ac2cc89ad203eb9ea75e4933d36bbda4d04d Mon Sep 17 00:00:00 2001
|
|
||||||
From: pyroscope <pyroscope.project@gmail.com>
|
|
||||||
Date: Fri, 15 Jun 2018 19:37:57 +0200
|
|
||||||
Subject: [PATCH] fix: properly close the XMLRPC log, resetting the handle
|
|
||||||
after close
|
|
||||||
|
|
||||||
---
|
|
||||||
src/thread_worker.cc | 9 +++++----
|
|
||||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git src/thread_worker.cc src/thread_worker.cc
|
|
||||||
index d6fa2f61..939d7026 100644
|
|
||||||
--- src/thread_worker.cc
|
|
||||||
+++ src/thread_worker.cc
|
|
||||||
@@ -113,14 +113,15 @@ ThreadWorker::change_xmlrpc_log() {
|
|
||||||
if (scgi() == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (scgi()->log_fd() != -1)
|
|
||||||
+ if (scgi()->log_fd() != -1) {
|
|
||||||
::close(scgi()->log_fd());
|
|
||||||
-
|
|
||||||
- if (m_xmlrpcLog.empty()) {
|
|
||||||
+ scgi()->set_log_fd(-1);
|
|
||||||
control->core()->push_log("Closed XMLRPC log.");
|
|
||||||
- return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (m_xmlrpcLog.empty())
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
scgi()->set_log_fd(open(rak::path_expand(m_xmlrpcLog).c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644));
|
|
||||||
|
|
||||||
if (scgi()->log_fd() == -1) {
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'rtorrent'
|
# Template file for 'rtorrent'
|
||||||
pkgname=rtorrent
|
pkgname=rtorrent
|
||||||
version=0.9.7
|
version=0.9.8
|
||||||
revision=4
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-xmlrpc-c"
|
configure_args="--with-xmlrpc-c"
|
||||||
hostmakedepends="automake libtool pkg-config"
|
hostmakedepends="automake libtool pkg-config"
|
||||||
|
@ -12,7 +12,7 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="https://github.com/rakshasa/rtorrent"
|
homepage="https://github.com/rakshasa/rtorrent"
|
||||||
distfiles="https://github.com/rakshasa/${pkgname}/archive/v${version}.tar.gz"
|
distfiles="https://github.com/rakshasa/${pkgname}/archive/v${version}.tar.gz"
|
||||||
checksum=5a7c9ded6b92d5ffc5ae32c19816f2328848d70841a4ce7d2739a5024d3587ca
|
checksum=bc889ce1dde475ec56aa72ae996912ff58723226a4f4256fef4f1f8636d991d4
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue