From 3edeb364bc7bfd3536e2b98dcc0f546aa2e249d2 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 10 Mar 2016 08:47:14 +0900 Subject: [PATCH 1/4] Fix a stray 'simple' method.insert check. --- src/command_dynamic.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/command_dynamic.cc b/src/command_dynamic.cc index ed6cedcf..91eb3c46 100644 --- a/src/command_dynamic.cc +++ b/src/command_dynamic.cc @@ -247,6 +247,10 @@ system_method_insert(const torrent::Object::list_type& args) { const std::string& options = itrArgs->as_string(); + // TODO: Replace find with a method that does '|' separated search + // for all valid options, and then cross-checks that unmixable ones + // aren't in there. Use a bitfield. + if (options.find("private") != std::string::npos) flags &= ~rpc::CommandMap::flag_public_xmlrpc; if (options.find("const") != std::string::npos) @@ -289,8 +293,7 @@ system_method_insert(const torrent::Object::list_type& args) { } else if (options.find("value") != std::string::npos || options.find("bool") != std::string::npos || options.find("string") != std::string::npos || - options.find("list") != std::string::npos || - options.find("simple") != std::string::npos) { + options.find("list") != std::string::npos) { torrent::Object::list_type new_args; new_args.push_back(rawKey); From 3e7f9d8b4fc1a3f6a63b4d1434b74bad7608544a Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 10 Mar 2016 09:24:08 +0900 Subject: [PATCH 2/4] Removed make check. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 89ff2805..c17ea6e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,4 @@ before_install: - git clone https://github.com/rakshasa/libtorrent.git && cd libtorrent && ./autogen.sh && configure && make -j24 && sudo make install && cd .. # Figure out how to fix the issue running 'make check'. -script: ./autogen.sh && ./configure && make -j24 && make -j24 && sudo make install +script: ./autogen.sh && ./configure && make -j12 && sudo make install From 629e421d675cae7c75295b8a5f5bcb2b691ed242 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 10 Mar 2016 09:37:58 +0900 Subject: [PATCH 3/4] Updated travis file to properly select gcc-4.7. --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c17ea6e4..454b9298 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,14 @@ before_install: - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test - sudo apt-get update -qq - sudo apt-get build-dep rtorrent libtorrent-dev + +if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.7; fi +if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi + # prevent `macro `AM_PATH_CPPUNIT' not found in library` in `autogen.sh` - - sudo apt-get install libcppunit-dev gcc-4.7 g++-4.7 -# `autogen.sh` doesn't call `configure` - - export CC=gcc-4.7 && export CXX=g++-4.7 - - git clone https://github.com/rakshasa/libtorrent.git && cd libtorrent && ./autogen.sh && configure && make -j24 && sudo make install && cd .. + - sudo apt-get install libcppunit-dev + + - git clone https://github.com/rakshasa/libtorrent.git && cd libtorrent && ./autogen.sh && configure && make -j12 && sudo make install && cd .. # Figure out how to fix the issue running 'make check'. script: ./autogen.sh && ./configure && make -j12 && sudo make install From 944d3041931ed5edd16a794807c45c302de0cd87 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 10 Mar 2016 09:41:16 +0900 Subject: [PATCH 4/4] Fixed travis config file. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 454b9298..e2c5df1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ before_install: - sudo apt-get update -qq - sudo apt-get build-dep rtorrent libtorrent-dev -if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.7; fi -if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi + - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.7; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi # prevent `macro `AM_PATH_CPPUNIT' not found in library` in `autogen.sh` - sudo apt-get install libcppunit-dev