Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rtorrent for openSUSE:Factory 
checked in at 2026-08-04 21:37:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rtorrent (Old)
 and      /work/SRC/openSUSE:Factory/.rtorrent.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rtorrent"

Tue Aug  4 21:37:42 2026 rev:37 rq:1369440 version:0.16.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/rtorrent/rtorrent.changes        2026-07-17 
18:51:52.490113595 +0200
+++ /work/SRC/openSUSE:Factory/.rtorrent.new.16738/rtorrent.changes     
2026-08-04 21:39:49.459516628 +0200
@@ -1,0 +2,6 @@
+Tue Aug  4 08:28:34 UTC 2026 - Jan Engelhardt <[email protected]>
+
+- Update to release 0.16.19
+  * Add log.print and enum.log_group methods
+
+-------------------------------------------------------------------

Old:
----
  rtorrent-0.16.18.tar.gz

New:
----
  rtorrent-0.16.19.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rtorrent.spec ++++++
--- /var/tmp/diff_new_pack.1EyOdL/_old  2026-08-04 21:39:50.055537511 +0200
+++ /var/tmp/diff_new_pack.1EyOdL/_new  2026-08-04 21:39:50.059537651 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           rtorrent
-Version:        0.16.18
+Version:        0.16.19
 Release:        0
 Summary:        Console-based BitTorrent client
 License:        SUSE-GPL-2.0+-with-openssl-exception

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.1EyOdL/_old  2026-08-04 21:39:50.107539333 +0200
+++ /var/tmp/diff_new_pack.1EyOdL/_new  2026-08-04 21:39:50.111539473 +0200
@@ -1,5 +1,5 @@
-mtime: 1784293489
-commit: bfced0b0c1b2d4600d77b3c01d9d7e1953cc0521e6f7abd48c14bf5c15016374
+mtime: 1785832157
+commit: 5d77aae2e6b4ba66eb4d93fc67bfab15c460ccdbc3af7665fdfd7b4885b79e23
 url: https://src.opensuse.org/jengelh/rtorrent
 revision: master
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-08-04 10:29:17.000000000 +0200
@@ -0,0 +1 @@
+.osc

++++++ rtorrent-0.16.18.tar.gz -> rtorrent-0.16.19.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/configure 
new/rtorrent-0.16.19/configure
--- old/rtorrent-0.16.18/configure      2026-07-17 11:06:23.000000000 +0200
+++ new/rtorrent-0.16.19/configure      2026-08-02 11:21:41.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.72 for rtorrent 0.16.18.
+# Generated by GNU Autoconf 2.72 for rtorrent 0.16.19.
 #
 # Report bugs to <[email protected]>.
 #
@@ -614,8 +614,8 @@
 # Identity of this package.
 PACKAGE_NAME='rtorrent'
 PACKAGE_TARNAME='rtorrent'
-PACKAGE_VERSION='0.16.18'
-PACKAGE_STRING='rtorrent 0.16.18'
+PACKAGE_VERSION='0.16.19'
+PACKAGE_STRING='rtorrent 0.16.19'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1421,7 +1421,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-'configure' configures rtorrent 0.16.18 to adapt to many kinds of systems.
+'configure' configures rtorrent 0.16.19 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1492,7 +1492,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of rtorrent 0.16.18:";;
+     short | recursive ) echo "Configuration of rtorrent 0.16.19:";;
    esac
   cat <<\_ACEOF
 
@@ -1644,7 +1644,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-rtorrent configure 0.16.18
+rtorrent configure 0.16.19
 generated by GNU Autoconf 2.72
 
 Copyright (C) 2023 Free Software Foundation, Inc.
@@ -2273,7 +2273,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by rtorrent $as_me 0.16.18, which was
+It was created by rtorrent $as_me 0.16.19, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3966,7 +3966,7 @@
 
 # Define the identity of the package.
  PACKAGE='rtorrent'
- VERSION='0.16.18'
+ VERSION='0.16.19'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -18708,7 +18708,7 @@
 fi
 
 
-printf "%s\n" "#define API_VERSION 23" >>confdefs.h
+printf "%s\n" "#define API_VERSION 24" >>confdefs.h
 
 
 
@@ -21491,19 +21491,19 @@
 fi
 
 pkg_failed=no
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent >= 
0.16.18" >&5
-printf %s "checking for libtorrent >= 0.16.18... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent >= 
0.16.19" >&5
+printf %s "checking for libtorrent >= 0.16.19... " >&6; }
 
 if test -n "$DEPENDENCIES_CFLAGS"; then
     pkg_cv_DEPENDENCIES_CFLAGS="$DEPENDENCIES_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"libtorrent >= 0.16.18\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libtorrent >= 0.16.18") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"libtorrent >= 0.16.19\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libtorrent >= 0.16.19") 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "libtorrent >= 0.16.18" 
2>/dev/null`
+  pkg_cv_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "libtorrent >= 0.16.19" 
2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -21515,12 +21515,12 @@
     pkg_cv_DEPENDENCIES_LIBS="$DEPENDENCIES_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"libtorrent >= 0.16.18\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libtorrent >= 0.16.18") 2>&5
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"libtorrent >= 0.16.19\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libtorrent >= 0.16.19") 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "libtorrent >= 0.16.18" 
2>/dev/null`
+  pkg_cv_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "libtorrent >= 0.16.19" 
2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -21541,14 +21541,14 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-                DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors 
--print-errors --cflags --libs "libtorrent >= 0.16.18" 2>&1`
+                DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors 
--print-errors --cflags --libs "libtorrent >= 0.16.19" 2>&1`
         else
-                DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags 
--libs "libtorrent >= 0.16.18" 2>&1`
+                DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags 
--libs "libtorrent >= 0.16.19" 2>&1`
         fi
         # Put the nasty error message in config.log where it belongs
         echo "$DEPENDENCIES_PKG_ERRORS" >&5
 
-        as_fn_error $? "Package requirements (libtorrent >= 0.16.18) were not 
met:
+        as_fn_error $? "Package requirements (libtorrent >= 0.16.19) were not 
met:
 
 $DEPENDENCIES_PKG_ERRORS
 
@@ -23548,7 +23548,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by rtorrent $as_me 0.16.18, which was
+This file was extended by rtorrent $as_me 0.16.19, which was
 generated by GNU Autoconf 2.72.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23616,7 +23616,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-rtorrent config.status 0.16.18
+rtorrent config.status 0.16.19
 configured by $0, generated by GNU Autoconf 2.72,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/configure.ac 
new/rtorrent-0.16.19/configure.ac
--- old/rtorrent-0.16.18/configure.ac   2026-07-17 10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/configure.ac   2026-08-02 11:03:01.000000000 +0200
@@ -1,6 +1,6 @@
 m4_pattern_allow([PKG_CHECK_EXISTS])
 
-AC_INIT([rtorrent],[0.16.18],[[email protected]])
+AC_INIT([rtorrent],[0.16.19],[[email protected]])
 
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIRS([scripts])
@@ -14,7 +14,7 @@
 
 PKG_PROG_PKG_CONFIG
 
-AC_DEFINE([API_VERSION], [23], [api version])
+AC_DEFINE([API_VERSION], [24], [api version])
 
 RAK_CHECK_CFLAGS
 RAK_CHECK_CXXFLAGS
@@ -47,7 +47,7 @@
 
 PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
 PKG_CHECK_MODULES([ZLIB], [zlib])
-PKG_CHECK_MODULES([DEPENDENCIES], [libtorrent >= 0.16.18])
+PKG_CHECK_MODULES([DEPENDENCIES], [libtorrent >= 0.16.19])
 
 AC_LANG_PUSH(C++)
 TORRENT_WITH_XMLRPC_C
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/command_download.cc 
new/rtorrent-0.16.19/src/command_download.cc
--- old/rtorrent-0.16.18/src/command_download.cc        2026-07-17 
10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/src/command_download.cc        2026-08-02 
11:03:01.000000000 +0200
@@ -974,6 +974,7 @@
   rpc::rpc.mark_safe("d.size_pex");
   rpc::rpc.mark_safe("d.completed_bytes");
   rpc::rpc.mark_safe("d.complete");
+  rpc::rpc.mark_safe("d.timestamp.started");
   rpc::rpc.mark_safe("d.timestamp.finished");
   rpc::rpc.mark_safe("d.bytes_done");
   rpc::rpc.mark_safe("d.peers_accounted");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/command_dynamic.cc 
new/rtorrent-0.16.19/src/command_dynamic.cc
--- old/rtorrent-0.16.18/src/command_dynamic.cc 2026-07-17 10:50:20.000000000 
+0200
+++ new/rtorrent-0.16.19/src/command_dynamic.cc 2026-08-02 11:03:01.000000000 
+0200
@@ -444,6 +444,8 @@
 
   CMD2_ANY         ("catch", std::bind(&cmd_catch, std::placeholders::_1, 
std::placeholders::_2));
 
+  CMD2_ANY_STRING  ("enum.log_group",                    [](auto, const auto& 
str) { return torrent::option_find_string_str(torrent::OPTION_LOG_GROUP, str); 
});
+
   CMD2_ANY         ("strings.choke_heuristics",          [](auto, auto) { 
return torrent::option_list_strings(torrent::OPTION_CHOKE_HEURISTICS); });
   CMD2_ANY         ("strings.choke_heuristics.upload",   [](auto, auto) { 
return torrent::option_list_strings(torrent::OPTION_CHOKE_HEURISTICS_UPLOAD); 
});
   CMD2_ANY         ("strings.choke_heuristics.download", [](auto, auto) { 
return torrent::option_list_strings(torrent::OPTION_CHOKE_HEURISTICS_DOWNLOAD); 
});
@@ -470,6 +472,8 @@
   rpc::rpc.mark_safe("method.rlookup");
   rpc::rpc.mark_safe("catch");
 
+  rpc::rpc.mark_safe("enum.log_group");
+
   rpc::rpc.mark_safe("strings.choke_heuristics");
   rpc::rpc.mark_safe("strings.choke_heuristics.upload");
   rpc::rpc.mark_safe("strings.choke_heuristics.download");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/command_local.cc 
new/rtorrent-0.16.19/src/command_local.cc
--- old/rtorrent-0.16.18/src/command_local.cc   2026-07-17 10:50:20.000000000 
+0200
+++ new/rtorrent-0.16.19/src/command_local.cc   2026-08-02 11:03:01.000000000 
+0200
@@ -117,7 +117,7 @@
   rpc::commands.call("method.insert", rpc::create_object_list("group." + name 
+ ".ratio.enable", "simple",
                                                               
"schedule=group." + name + ".ratio,5,60,on_ratio=" + name));
   rpc::commands.call("method.insert", rpc::create_object_list("group." + name 
+ ".ratio.disable", "simple",
-                                                              
"schedule_remove=group." + name + ".ratio"));
+                                                              
"schedule.remove=group." + name + ".ratio"));
   rpc::commands.call("method.insert", rpc::create_object_list("group."  + name 
+ ".ratio.command", "simple",
                                                               "d.try_close= 
;d.ignore_commands.set=1"));
   rpc::commands.call("method.insert", rpc::create_object_list("group." + name 
+ ".view", "string", view));
@@ -250,12 +250,12 @@
 
     CMD_ANY        (category_name + ".size",      [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_managed_size(category); });
     CMD_ANY        (category_name + ".max_size",  [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_max_size(category); });
-    CMD_ANY        (category_name + ".min_alloc", [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_min_allocation(category); 
});
-    CMD_ANY        (category_name + ".max_alloc", [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_max_allocation(category); 
});
 
     if (i == 0)
       continue;
 
+    CMD_ANY        (category_name + ".min_alloc",     [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_min_allocation(category); 
});
+    CMD_ANY        (category_name + ".max_alloc",     [category](auto, auto) { 
return torrent::runtime::socket_manager()->category_max_allocation(category); 
});
     CMD_ANY_VALUE_V(category_name + ".min_alloc.set", [category](auto, auto& 
value) { 
torrent::runtime::socket_manager()->set_category_min_allocation(category, 
value); });
     CMD_ANY_VALUE_V(category_name + ".max_alloc.set", [category](auto, auto& 
value) { 
torrent::runtime::socket_manager()->set_category_max_allocation(category, 
value); });
   }
@@ -354,6 +354,10 @@
 
     rpc::rpc.mark_safe(category_name + ".size");
     rpc::rpc.mark_safe(category_name + ".max_size");
+
+    if (i == 0)
+      continue;
+
     rpc::rpc.mark_safe(category_name + ".min_alloc");
     rpc::rpc.mark_safe(category_name + ".max_alloc");
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/command_logging.cc 
new/rtorrent-0.16.19/src/command_logging.cc
--- old/rtorrent-0.16.18/src/command_logging.cc 2026-07-17 10:50:20.000000000 
+0200
+++ new/rtorrent-0.16.19/src/command_logging.cc 2026-08-02 11:03:01.000000000 
+0200
@@ -1,6 +1,7 @@
 #include "config.h"
 
 #include <fcntl.h>
+#include <iterator>
 #include <stdio.h>
 #include <unistd.h>
 #include <torrent/data/chunk_utils.h>
@@ -15,6 +16,7 @@
 #include "core/download.h"
 #include "core/download_list.h"
 #include "core/manager.h"
+#include "rpc/parse.h"
 #include "rpc/parse_commands.h"
 
 torrent::Object
@@ -38,6 +40,32 @@
   return torrent::Object();
 }
 
+torrent::Object
+apply_log_print(const torrent::Object::list_type& args) {
+  if (args.size() < 2)
+    throw torrent::input_error("Invalid number of arguments.");
+
+  torrent::Object::value_type group;
+
+  if (args.front().is_value())
+    group = args.front().as_value();
+  else if (args.front().is_string())
+    group = torrent::option_find_string_str(torrent::OPTION_LOG_GROUP, 
args.front().as_string());
+  else
+    throw torrent::input_error("Invalid log group.");
+
+  if (group < 0 || group >= torrent::LOG_GROUP_MAX_SIZE)
+    throw torrent::input_error("Invalid log group.");
+
+  std::string message;
+
+  for (auto itr = std::next(args.begin()); itr != args.end(); ++itr)
+    rpc::print_object_std(&message, &*itr, 0);
+
+  torrent::log_groups[group].internal_print(message);
+  return torrent::Object();
+}
+
 // TODO: Deprecated.
 torrent::Object
 apply_log(const torrent::Object::string_type& arg, int logType) {
@@ -112,6 +140,7 @@
   CMD2_ANY_STRING_V("log.close",            
std::bind(&torrent::log_close_output_str, std::placeholders::_2));
 
   CMD2_ANY_LIST    ("log.add_output",       std::bind(&apply_log_add_output, 
std::placeholders::_2));
+  CMD2_ANY_LIST    ("log.print",            std::bind(&apply_log_print, 
std::placeholders::_2));
 
   CMD2_ANY_STRING  ("log.execute",          std::bind(&apply_log, 
std::placeholders::_2, 0));
   CMD2_ANY_STRING  ("log.vmmap.dump",       std::bind(&log_vmmap_dump, 
std::placeholders::_2));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/input/input_event.h 
new/rtorrent-0.16.19/src/input/input_event.h
--- old/rtorrent-0.16.18/src/input/input_event.h        2026-07-17 
10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/src/input/input_event.h        2026-08-02 
11:03:01.000000000 +0200
@@ -2,12 +2,11 @@
 #define RTORRENT_INPUT_INPUT_EVENT_H
 
 #include <functional>
-
-#include <torrent/event.h>
+#include <torrent/system/event.h>
 
 namespace input {
 
-class InputEvent : public torrent::Event {
+class InputEvent : public torrent::system::Event {
 public:
   typedef std::function<void (int)> slot_int;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/main.cc 
new/rtorrent-0.16.19/src/main.cc
--- old/rtorrent-0.16.18/src/main.cc    2026-07-17 10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/src/main.cc    2026-08-02 11:03:01.000000000 +0200
@@ -301,8 +301,6 @@
        "schedule = low_diskspace,5,60,((close_low_diskspace,500M))\n"
        "schedule = 
prune_file_status,3600,86400,((system.file_status_cache.prune))\n"
 
-       "protocol.encryption.set=allow_incoming,prefer_plaintext,enable_retry\n"
-
        "ui.color.focus.set=reverse\n"
     );
 
@@ -346,8 +344,9 @@
     CMD_REDIRECT("directory",             "directory.default.set");
     CMD_REDIRECT("session",               "session.path.set");
 
-    CMD_REDIRECT("scgi_port",             "network.scgi.open_port");
-    CMD_REDIRECT("scgi_local",            "network.scgi.open_local");
+    CMD_REDIRECT_NO_EXPORT("port_range",  "network.listen.port.range.set");
+    CMD_REDIRECT_NO_EXPORT("scgi_port",   "network.scgi.open_port");
+    CMD_REDIRECT_NO_EXPORT("scgi_local",  "network.scgi.open_local");
 
     CMD_REDIRECT("to_gm_time",            "convert.gm_time");
     CMD_REDIRECT("to_gm_date",            "convert.gm_date");
@@ -391,8 +390,6 @@
       CMD_REDIRECT("schedule2",        "schedule");
       CMD_REDIRECT("schedule_remove2", "schedule.remove");
 
-      // TODO: Remove file.append when cleaning these up.
-
       CMD_REDIRECT("bind",                  "network.bind_address.set");
       CMD_REDIRECT("ip",                    "network.local_address.set");
       CMD_REDIRECT("port_range",            "network.port_range.set");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/rpc/scgi.h 
new/rtorrent-0.16.19/src/rpc/scgi.h
--- old/rtorrent-0.16.18/src/rpc/scgi.h 2026-07-17 10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/src/rpc/scgi.h 2026-08-02 11:03:02.000000000 +0200
@@ -3,13 +3,13 @@
 
 #include <array>
 #include <memory>
-#include <torrent/event.h>
+#include <torrent/system/event.h>
 
 #include "rpc/scgi_task.h"
 
 namespace rpc {
 
-class SCgi : public torrent::Event {
+class SCgi : public torrent::system::Event {
 public:
   static const int max_tasks = 100;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/rpc/scgi_task.h 
new/rtorrent-0.16.19/src/rpc/scgi_task.h
--- old/rtorrent-0.16.18/src/rpc/scgi_task.h    2026-07-17 10:50:20.000000000 
+0200
+++ new/rtorrent-0.16.19/src/rpc/scgi_task.h    2026-08-02 11:03:02.000000000 
+0200
@@ -4,13 +4,13 @@
 #include <memory>
 #include <mutex>
 #include <vector>
-#include <torrent/event.h>
+#include <torrent/system/event.h>
 
 namespace rpc {
 
 class SCgi;
 
-class SCgiTask : public torrent::Event {
+class SCgiTask : public torrent::system::Event {
 public:
   static constexpr int default_buffer_size = 8191;
   static constexpr int max_header_size     = 2000;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/src/setup.cc 
new/rtorrent-0.16.19/src/setup.cc
--- old/rtorrent-0.16.18/src/setup.cc   2026-07-17 10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/src/setup.cc   2026-08-02 11:03:02.000000000 +0200
@@ -38,7 +38,7 @@
     optionParser.insert_option('b', [](auto& arg) { 
rpc::call_command_set_string("network.bind_address.set", arg); });
     optionParser.insert_option('d', [](auto& arg) { 
rpc::call_command_set_string("directory.default.set", arg); });
     optionParser.insert_option('i', [](auto& arg) { 
rpc::call_command_set_string("ip", arg); });
-    optionParser.insert_option('p', [](auto& arg) { 
rpc::call_command_set_string("network.port_range.set", arg); });
+    optionParser.insert_option('p', [](auto& arg) { 
rpc::call_command_set_string("network.listen.port.range.set", arg); });
     optionParser.insert_option('s', [](auto& arg) { 
rpc::call_command_set_string("session", arg); });
 
     optionParser.insert_option('O',      [](auto& arg) { 
rpc::parse_command_single_std(arg); });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/Makefile.am 
new/rtorrent-0.16.19/test/Makefile.am
--- old/rtorrent-0.16.18/test/Makefile.am       2026-07-17 10:50:20.000000000 
+0200
+++ new/rtorrent-0.16.19/test/Makefile.am       2026-08-02 11:03:02.000000000 
+0200
@@ -49,6 +49,8 @@
 rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \
        src/test_command_dynamic.cc \
        src/test_command_dynamic.h \
+       src/test_command_local.cc \
+       src/test_command_local.h \
        src/test_watch_ready_queue.cc \
        src/test_watch_ready_queue.h
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/Makefile.in 
new/rtorrent-0.16.19/test/Makefile.in
--- old/rtorrent-0.16.18/test/Makefile.in       2026-07-17 11:06:24.000000000 
+0200
+++ new/rtorrent-0.16.19/test/Makefile.in       2026-08-02 11:21:42.000000000 
+0200
@@ -151,6 +151,7 @@
        helpers/rtorrent_Test_Src-test_thread.$(OBJEXT)
 am_rtorrent_Test_Src_OBJECTS = $(am__objects_2) \
        src/rtorrent_Test_Src-test_command_dynamic.$(OBJEXT) \
+       src/rtorrent_Test_Src-test_command_local.$(OBJEXT) \
        src/rtorrent_Test_Src-test_watch_ready_queue.$(OBJEXT)
 rtorrent_Test_Src_OBJECTS = $(am_rtorrent_Test_Src_OBJECTS)
 rtorrent_Test_Src_DEPENDENCIES = $(rtorrent_Test_LDADD)
@@ -195,6 +196,7 @@
        rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_parse_options.Po \
        rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_xmlrpc.Po \
        src/$(DEPDIR)/rtorrent_Test_Src-test_command_dynamic.Po \
+       src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po \
        src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Po
 am__mv = mv -f
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
@@ -675,6 +677,8 @@
 rtorrent_Test_Src_SOURCES = $(rtorrent_Test_Common) \
        src/test_command_dynamic.cc \
        src/test_command_dynamic.h \
+       src/test_command_local.cc \
+       src/test_command_local.h \
        src/test_watch_ready_queue.cc \
        src/test_watch_ready_queue.h
 
@@ -782,6 +786,8 @@
        @: >>src/$(DEPDIR)/$(am__dirstamp)
 src/rtorrent_Test_Src-test_command_dynamic.$(OBJEXT):  \
        src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
+src/rtorrent_Test_Src-test_command_local.$(OBJEXT):  \
+       src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/rtorrent_Test_Src-test_watch_ready_queue.$(OBJEXT):  \
        src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 
@@ -820,6 +826,7 @@
 @AMDEP_TRUE@@am__include@ 
@am__quote@rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_parse_options.Po@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ 
@am__quote@rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_xmlrpc.Po@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ 
@am__quote@src/$(DEPDIR)/rtorrent_Test_Src-test_command_dynamic.Po@am__quote@ # 
am--include-marker
+@AMDEP_TRUE@@am__include@ 
@am__quote@src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po@am__quote@ # 
am--include-marker
 @AMDEP_TRUE@@am__include@ 
@am__quote@src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Po@am__quote@ 
# am--include-marker
 
 $(am__depfiles_remade):
@@ -1160,6 +1167,20 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(rtorrent_Test_Src_CXXFLAGS) $(CXXFLAGS) -c -o 
src/rtorrent_Test_Src-test_command_dynamic.obj `if test -f 
'src/test_command_dynamic.cc'; then $(CYGPATH_W) 'src/test_command_dynamic.cc'; 
else $(CYGPATH_W) '$(srcdir)/src/test_command_dynamic.cc'; fi`
 
+src/rtorrent_Test_Src-test_command_local.o: src/test_command_local.cc
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtorrent_Test_Src_CXXFLAGS) 
$(CXXFLAGS) -MT src/rtorrent_Test_Src-test_command_local.o -MD -MP -MF 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Tpo -c -o 
src/rtorrent_Test_Src-test_command_local.o `test -f 'src/test_command_local.cc' 
|| echo '$(srcdir)/'`src/test_command_local.cc
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Tpo 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     
$(AM_V_CXX)source='src/test_command_local.cc' 
object='src/rtorrent_Test_Src-test_command_local.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(rtorrent_Test_Src_CXXFLAGS) $(CXXFLAGS) -c -o 
src/rtorrent_Test_Src-test_command_local.o `test -f 'src/test_command_local.cc' 
|| echo '$(srcdir)/'`src/test_command_local.cc
+
+src/rtorrent_Test_Src-test_command_local.obj: src/test_command_local.cc
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtorrent_Test_Src_CXXFLAGS) 
$(CXXFLAGS) -MT src/rtorrent_Test_Src-test_command_local.obj -MD -MP -MF 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Tpo -c -o 
src/rtorrent_Test_Src-test_command_local.obj `if test -f 
'src/test_command_local.cc'; then $(CYGPATH_W) 'src/test_command_local.cc'; 
else $(CYGPATH_W) '$(srcdir)/src/test_command_local.cc'; fi`
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Tpo 
src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     
$(AM_V_CXX)source='src/test_command_local.cc' 
object='src/rtorrent_Test_Src-test_command_local.obj' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(rtorrent_Test_Src_CXXFLAGS) $(CXXFLAGS) -c -o 
src/rtorrent_Test_Src-test_command_local.obj `if test -f 
'src/test_command_local.cc'; then $(CYGPATH_W) 'src/test_command_local.cc'; 
else $(CYGPATH_W) '$(srcdir)/src/test_command_local.cc'; fi`
+
 src/rtorrent_Test_Src-test_watch_ready_queue.o: src/test_watch_ready_queue.cc
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rtorrent_Test_Src_CXXFLAGS) 
$(CXXFLAGS) -MT src/rtorrent_Test_Src-test_watch_ready_queue.o -MD -MP -MF 
src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Tpo -c -o 
src/rtorrent_Test_Src-test_watch_ready_queue.o `test -f 
'src/test_watch_ready_queue.cc' || echo 
'$(srcdir)/'`src/test_watch_ready_queue.cc
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) 
src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Tpo 
src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Po
@@ -1532,6 +1553,7 @@
        -rm -f rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_parse_options.Po
        -rm -f rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_xmlrpc.Po
        -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_command_dynamic.Po
+       -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po
        -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Po
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
@@ -1600,6 +1622,7 @@
        -rm -f rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_parse_options.Po
        -rm -f rpc/$(DEPDIR)/rtorrent_Test_Rpc-test_xmlrpc.Po
        -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_command_dynamic.Po
+       -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_command_local.Po
        -rm -f src/$(DEPDIR)/rtorrent_Test_Src-test_watch_ready_queue.Po
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/helpers/mock_compare.h 
new/rtorrent-0.16.19/test/helpers/mock_compare.h
--- old/rtorrent-0.16.18/test/helpers/mock_compare.h    2026-07-17 
10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/test/helpers/mock_compare.h    2026-08-02 
11:03:02.000000000 +0200
@@ -2,9 +2,10 @@
 #define LIBTORRENT_HELPERS_MOCK_COMPARE_H
 
 #include <algorithm>
+#include <map>
 #include <type_traits>
-#include <torrent/event.h>
 #include <torrent/net/socket_address.h>
+#include <torrent/system/event.h>
 
 // Compare arguments to mock functions with what is expected. The lhs
 // are the expected arguments, rhs are the ones called with.
@@ -13,13 +14,13 @@
 inline bool mock_compare_arg(Arg lhs, Arg rhs) { return lhs == rhs; }
 
 template <int I, typename A, typename... Args>
-typename std::enable_if<I == 1, int>::type
+std::enable_if_t<I == 1, int>
 mock_compare_tuple(const std::tuple<A, Args...>& lhs, const 
std::tuple<Args...>& rhs) {
   return mock_compare_arg(std::get<I>(lhs), std::get<I - 1>(rhs)) ? 0 : 1;
 }
 
 template <int I, typename A, typename... Args>
-typename std::enable_if<1 < I, int>::type
+std::enable_if_t<1 < I, int>
 mock_compare_tuple(const std::tuple<A, Args...>& lhs, const 
std::tuple<Args...>& rhs) {
   auto res = mock_compare_tuple<I - 1>(lhs, rhs);
 
@@ -70,24 +71,37 @@
 // Specialize:
 //
 
+constexpr int mock_compare_gt_two_int = -0xFD30;
+
+template <>
+inline bool mock_compare_arg<int>(int lhs, int rhs) {
+  if (lhs == mock_compare_gt_two_int)
+    return rhs > 2;
+  if (rhs == mock_compare_gt_two_int)
+    return lhs > 2;
+
+  return lhs == rhs;
+}
+
 template <>
 inline bool mock_compare_arg<sockaddr*>(sockaddr* lhs, sockaddr* rhs) {
   return lhs != nullptr && rhs != nullptr && torrent::sa_equal(lhs, rhs);
 }
+
 template <>
 inline bool mock_compare_arg<const sockaddr*>(const sockaddr* lhs, const 
sockaddr* rhs) {
   return lhs != nullptr && rhs != nullptr && torrent::sa_equal(lhs, rhs);
 }
 
 template <>
-inline bool mock_compare_arg<torrent::Event*>(torrent::Event* lhs, 
torrent::Event* rhs) {
-  if (mock_compare_map<torrent::Event>::is_key(lhs)) {
-    if (!mock_compare_map<torrent::Event>::has_value(rhs)) {
-      mock_compare_map<torrent::Event>::values[lhs] = rhs;
+inline bool mock_compare_arg<torrent::system::Event*>(torrent::system::Event* 
lhs, torrent::system::Event* rhs) {
+  if (mock_compare_map<torrent::system::Event>::is_key(lhs)) {
+    if (!mock_compare_map<torrent::system::Event>::has_value(rhs)) {
+      mock_compare_map<torrent::system::Event>::values[lhs] = rhs;
       return true;
     }
 
-    return mock_compare_map<torrent::Event>::has_key(lhs) && 
mock_compare_map<torrent::Event>::get(lhs) == rhs;
+    return mock_compare_map<torrent::system::Event>::has_key(lhs) && 
mock_compare_map<torrent::system::Event>::get(lhs) == rhs;
   }
 
   return lhs == rhs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/helpers/mock_function.cc 
new/rtorrent-0.16.19/test/helpers/mock_function.cc
--- old/rtorrent-0.16.18/test/helpers/mock_function.cc  2026-07-17 
10:50:20.000000000 +0200
+++ new/rtorrent-0.16.19/test/helpers/mock_function.cc  2026-08-02 
11:03:02.000000000 +0200
@@ -6,9 +6,9 @@
 #include <iostream>
 #include <unistd.h>
 
-#include "torrent/event.h"
 #include "torrent/net/socket_address.h"
 #include "torrent/net/fd.h"
+#include "torrent/system/event.h"
 #include "torrent/utils/log.h"
 #include "torrent/utils/random.h"
 
@@ -32,7 +32,7 @@
   MOCK_CLEANUP_MAP(torrent::random_uniform_uint16);
   MOCK_CLEANUP_MAP(torrent::random_uniform_uint32);
 
-  mock_compare_map<torrent::Event>::values.clear();
+  mock_compare_map<torrent::system::Event>::values.clear();
 }
 } // namespace
 
@@ -55,7 +55,9 @@
 
   mock_redirect(torrent::fd__close, std::function<int(int fildes)>([](int 
fildes) { return ::close(fildes); }));
   mock_redirect(torrent::fd__fcntl_int, std::function<int(int fildes, int cmd, 
int arg)>([](int fildes, int cmd, int arg) { return ::fcntl(fildes, cmd, arg); 
}));
-  mock_redirect(torrent::fd__setsockopt_int, std::function<int(int socket, int 
level, int option_name, int option_value)>([](int socket, int level, int 
option_name, int option_value) { return ::setsockopt(socket, level, 
option_name, &option_value, sizeof(int)); }));
+  mock_redirect(torrent::fd__setsockopt_int, std::function<int(int socket, int 
level, int option_name, int option_value)>([](int socket, int level, int 
option_name, int option_value) {
+      return ::setsockopt(socket, level, option_name, &option_value, 
sizeof(int));
+    }));
   mock_redirect(torrent::fd__socket, std::function<int(int domain, int type, 
int protocol)>([](int domain, int type, int protocol) { return ::socket(domain, 
type, protocol); }));
 }
 
@@ -113,69 +115,6 @@
 }
 
 //
-// Mock functions for 'torrent/common.h':
-//
-
-namespace this_thread {
-
-void event_open(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_open, event);
-}
-
-void event_open_and_count(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, 
&torrent::this_thread::event_open_and_count, event);
-}
-
-void event_close_and_count(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, 
&torrent::this_thread::event_close_and_count, event);
-}
-
-void event_closed_and_count(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, 
&torrent::this_thread::event_closed_and_count, event);
-}
-
-void event_insert_read(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_insert_read, 
event);
-}
-
-void event_insert_write(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_insert_write, 
event);
-}
-
-void event_insert_error(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_insert_error, 
event);
-}
-
-void event_remove_read(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_remove_read, 
event);
-}
-
-void event_remove_write(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_remove_write, 
event);
-}
-
-void event_remove_error(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, &torrent::this_thread::event_remove_error, 
event);
-}
-
-void event_remove_and_close(Event* event) {
-  MOCK_LOG("fd:%i type_name:%s", event->file_descriptor(), event->type_name());
-  return mock_call<void>(__func__, 
&torrent::this_thread::event_remove_and_close, event);
-}
-
-}
-
-//
 // Mock functions for 'torrent/utils/random.h':
 //
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/src/test_command_local.cc 
new/rtorrent-0.16.19/test/src/test_command_local.cc
--- old/rtorrent-0.16.18/test/src/test_command_local.cc 1970-01-01 
01:00:00.000000000 +0100
+++ new/rtorrent-0.16.19/test/src/test_command_local.cc 2026-08-02 
11:03:02.000000000 +0200
@@ -0,0 +1,54 @@
+#include "config.h"
+
+#include "test/src/test_command_local.h"
+
+#include <torrent/torrent.h>
+#include <torrent/runtime/socket_manager.h>
+#include <torrent/utils/option_strings.h>
+
+#include "control.h"
+#include "globals.h"
+#include "rpc/parse_commands.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION(TestCommandLocal);
+
+void initialize_command_local();
+
+void
+TestCommandLocal::setUp() {
+  torrent::initialize_main_thread();
+  torrent::initialize();
+
+  if (control == nullptr)
+    control = new Control;
+
+  if (!rpc::commands.has("system.sockets.size"))
+    initialize_command_local();
+}
+
+void
+TestCommandLocal::tearDown() {
+  torrent::cleanup();
+}
+
+void
+TestCommandLocal::test_socket_category_commands() {
+  for (uint32_t i = 0; i < torrent::runtime::SocketManager::category_count; 
++i) {
+    auto category = 
static_cast<torrent::runtime::socket_manager_category_t>(i);
+    auto name     = "system.sockets." + 
torrent::option_to_str_or_throw(torrent::OPTION_SOCKET_CATEGORY, i);
+
+    for (const auto suffix : {".size", ".max_size", ".min_alloc", 
".max_alloc"})
+      if (rpc::commands.has(name + suffix))
+        CPPUNIT_ASSERT_NO_THROW(rpc::commands.call(name + suffix));
+
+    const bool has_allocation = category != torrent::runtime::category_generic;
+
+    CPPUNIT_ASSERT(rpc::commands.has(name + ".size"));
+    CPPUNIT_ASSERT(rpc::commands.has(name + ".max_size"));
+
+    CPPUNIT_ASSERT_EQUAL(has_allocation, rpc::commands.has(name + 
".min_alloc"));
+    CPPUNIT_ASSERT_EQUAL(has_allocation, rpc::commands.has(name + 
".max_alloc"));
+    CPPUNIT_ASSERT_EQUAL(has_allocation, rpc::commands.has(name + 
".min_alloc.set"));
+    CPPUNIT_ASSERT_EQUAL(has_allocation, rpc::commands.has(name + 
".max_alloc.set"));
+  }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rtorrent-0.16.18/test/src/test_command_local.h 
new/rtorrent-0.16.19/test/src/test_command_local.h
--- old/rtorrent-0.16.18/test/src/test_command_local.h  1970-01-01 
01:00:00.000000000 +0100
+++ new/rtorrent-0.16.19/test/src/test_command_local.h  2026-08-02 
11:03:02.000000000 +0200
@@ -0,0 +1,15 @@
+#include "test/helpers/test_fixture.h"
+
+class TestCommandLocal : public test_fixture {
+  CPPUNIT_TEST_SUITE(TestCommandLocal);
+
+  CPPUNIT_TEST(test_socket_category_commands);
+
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void test_socket_category_commands();
+};

Reply via email to