Skip to content

Commit

Permalink
update to libtorrent master HEAD, version 2.0.6-26 (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml authored Jun 4, 2022
1 parent 3a30d4f commit 863b09a
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 17 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Alden Torres
* Copyright (c) 2018-2022, Alden Torres
*
* Licensed under the terms of the MIT license.
* Copy of the license at https://opensource.org/licenses/MIT
Expand All @@ -13,7 +13,7 @@ plugins {
}

group = "org.libtorrent4j"
version = "2.0.5-26-RC1"
version = "2.0.6-26"

java {
// using java 8 for android compatibility
Expand Down
9 changes: 8 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
2.0.5-26 (temp)
2.0.6-26

* using libtorrent master
* added API support to change the disk I/O back-end
* lt:fix MacOS version check for preadv() support
* lt:handle all "fastresume rejected" cases consistently
* lt:default to a single hashing thread, for full checks
* lt:fix bind-to-device for tracker announces and UPnP
* lt:fix bug when checking files and the first piece is invalid
* lt:rename peer_tos -> peer_dscp
* lt:updated libdatachannel to v0.17.1
* lt:simplify part of pe_crypto, init_bt_handshake and stats accounting
* lt:add new alert, oversized_file_alert, posted when an existing file in a
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/libtorrent4j/LibTorrent.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Alden Torres
* Copyright (c) 2018-2022, Alden Torres
*
* Licensed under the terms of the MIT license.
* Copy of the license at https://opensource.org/licenses/MIT
Expand Down Expand Up @@ -43,7 +43,7 @@ public static String version() {
* @return the git revision
*/
public static String revision() {
return "f484a0eff66c1d8932d694e1785da204ac1a2769";
return "ed88357b4cdf7ae9d4b35aa77e654afbe2b7b11c";
}

/**
Expand Down Expand Up @@ -71,7 +71,7 @@ public static String opensslVersion() {
* @return libtorrent4j version.
*/
public static String libtorrent4jVersion() {
return "2.0.5-26-RC1";
return "2.0.6-26";
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/libtorrent4j/swig/libtorrent_jni.java
Original file line number Diff line number Diff line change
Expand Up @@ -3047,6 +3047,7 @@ public class libtorrent_jni {
public final static native int settings_pack_announce_crypto_support_get();
public final static native int settings_pack_tracker_completion_timeout_get();
public final static native int settings_pack_disk_io_write_mode_get();
public final static native int settings_pack_active_downloads_get();
public final static native int settings_pack_auto_manage_interval_get();
public final static native int settings_pack_optimistic_disk_retry_get();
public final static native int settings_pack_num_optimistic_unchoke_slots_get();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/libtorrent4j/swig/settings_pack.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ public final static class int_types {
public final static settings_pack.int_types disk_io_read_mode = new settings_pack.int_types("disk_io_read_mode");
public final static settings_pack.int_types outgoing_port = new settings_pack.int_types("outgoing_port");
public final static settings_pack.int_types num_outgoing_ports = new settings_pack.int_types("num_outgoing_ports");
public final static settings_pack.int_types peer_tos = new settings_pack.int_types("peer_tos");
public final static settings_pack.int_types active_downloads = new settings_pack.int_types("active_downloads");
public final static settings_pack.int_types peer_dscp = new settings_pack.int_types("peer_dscp");
public final static settings_pack.int_types active_downloads = new settings_pack.int_types("active_downloads", libtorrent_jni.settings_pack_active_downloads_get());
public final static settings_pack.int_types active_seeds = new settings_pack.int_types("active_seeds");
public final static settings_pack.int_types active_checking = new settings_pack.int_types("active_checking");
public final static settings_pack.int_types active_dht_limit = new settings_pack.int_types("active_dht_limit");
Expand Down Expand Up @@ -465,7 +465,7 @@ private int_types(String swigName, int_types swigEnum) {
swigNext = this.swigValue+1;
}

private static int_types[] swigValues = { tracker_completion_timeout, tracker_receive_timeout, stop_tracker_timeout, tracker_maximum_response_length, piece_timeout, request_timeout, request_queue_time, max_allowed_in_request_queue, max_out_request_queue, whole_pieces_threshold, peer_timeout, urlseed_timeout, urlseed_pipeline_size, urlseed_wait_retry, file_pool_size, max_failcount, min_reconnect_time, peer_connect_timeout, connection_speed, inactivity_timeout, unchoke_interval, optimistic_unchoke_interval, num_want, initial_picker_threshold, allowed_fast_set_size, suggest_mode, max_queued_disk_bytes, handshake_timeout, send_buffer_low_watermark, send_buffer_watermark, send_buffer_watermark_factor, choking_algorithm, seed_choking_algorithm, disk_io_write_mode, disk_io_read_mode, outgoing_port, num_outgoing_ports, peer_tos, active_downloads, active_seeds, active_checking, active_dht_limit, active_tracker_limit, active_lsd_limit, active_limit, auto_manage_interval, seed_time_limit, auto_scrape_interval, auto_scrape_min_interval, max_peerlist_size, max_paused_peerlist_size, min_announce_interval, auto_manage_startup, seeding_piece_quota, max_rejects, recv_socket_buffer_size, send_socket_buffer_size, max_peer_recv_buffer_size, optimistic_disk_retry, max_suggest_pieces, local_service_announce_interval, dht_announce_interval, udp_tracker_token_expiry, num_optimistic_unchoke_slots, max_pex_peers, tick_interval, share_mode_target, upload_rate_limit, download_rate_limit, dht_upload_rate_limit, unchoke_slots_limit, connections_limit, connections_slack, utp_target_delay, utp_gain_factor, utp_min_timeout, utp_syn_resends, utp_fin_resends, utp_num_resends, utp_connect_timeout, utp_loss_multiplier, mixed_mode_algorithm, listen_queue_size, torrent_connect_boost, alert_queue_size, max_metadata_size, hashing_threads, checking_mem_usage, predictive_piece_announce, aio_threads, tracker_backoff, share_ratio_limit, seed_time_ratio_limit, peer_turnover, peer_turnover_cutoff, peer_turnover_interval, connect_seed_every_n_download, max_http_recv_buffer_size, max_retry_port_bind, alert_mask, out_enc_policy, in_enc_policy, allowed_enc_level, inactive_down_rate, inactive_up_rate, proxy_type, proxy_port, i2p_port, urlseed_max_request_bytes, web_seed_name_lookup_retry, close_file_interval, utp_cwnd_reduce_timer, max_web_seed_connections, resolver_cache_timeout, send_not_sent_low_watermark, rate_choker_initial_threshold, upnp_lease_duration, max_concurrent_http_announces, dht_max_peers_reply, dht_search_branching, dht_max_fail_count, dht_max_torrents, dht_max_dht_items, dht_max_peers, dht_max_torrent_search_reply, dht_block_timeout, dht_block_ratelimit, dht_item_lifetime, dht_sample_infohashes_interval, dht_max_infohashes_sample_count, max_piece_count, metadata_token_limit, min_websocket_announce_interval, webtorrent_connection_timeout, max_int_setting_internal };
private static int_types[] swigValues = { tracker_completion_timeout, tracker_receive_timeout, stop_tracker_timeout, tracker_maximum_response_length, piece_timeout, request_timeout, request_queue_time, max_allowed_in_request_queue, max_out_request_queue, whole_pieces_threshold, peer_timeout, urlseed_timeout, urlseed_pipeline_size, urlseed_wait_retry, file_pool_size, max_failcount, min_reconnect_time, peer_connect_timeout, connection_speed, inactivity_timeout, unchoke_interval, optimistic_unchoke_interval, num_want, initial_picker_threshold, allowed_fast_set_size, suggest_mode, max_queued_disk_bytes, handshake_timeout, send_buffer_low_watermark, send_buffer_watermark, send_buffer_watermark_factor, choking_algorithm, seed_choking_algorithm, disk_io_write_mode, disk_io_read_mode, outgoing_port, num_outgoing_ports, peer_dscp, active_downloads, active_seeds, active_checking, active_dht_limit, active_tracker_limit, active_lsd_limit, active_limit, auto_manage_interval, seed_time_limit, auto_scrape_interval, auto_scrape_min_interval, max_peerlist_size, max_paused_peerlist_size, min_announce_interval, auto_manage_startup, seeding_piece_quota, max_rejects, recv_socket_buffer_size, send_socket_buffer_size, max_peer_recv_buffer_size, optimistic_disk_retry, max_suggest_pieces, local_service_announce_interval, dht_announce_interval, udp_tracker_token_expiry, num_optimistic_unchoke_slots, max_pex_peers, tick_interval, share_mode_target, upload_rate_limit, download_rate_limit, dht_upload_rate_limit, unchoke_slots_limit, connections_limit, connections_slack, utp_target_delay, utp_gain_factor, utp_min_timeout, utp_syn_resends, utp_fin_resends, utp_num_resends, utp_connect_timeout, utp_loss_multiplier, mixed_mode_algorithm, listen_queue_size, torrent_connect_boost, alert_queue_size, max_metadata_size, hashing_threads, checking_mem_usage, predictive_piece_announce, aio_threads, tracker_backoff, share_ratio_limit, seed_time_ratio_limit, peer_turnover, peer_turnover_cutoff, peer_turnover_interval, connect_seed_every_n_download, max_http_recv_buffer_size, max_retry_port_bind, alert_mask, out_enc_policy, in_enc_policy, allowed_enc_level, inactive_down_rate, inactive_up_rate, proxy_type, proxy_port, i2p_port, urlseed_max_request_bytes, web_seed_name_lookup_retry, close_file_interval, utp_cwnd_reduce_timer, max_web_seed_connections, resolver_cache_timeout, send_not_sent_low_watermark, rate_choker_initial_threshold, upnp_lease_duration, max_concurrent_http_announces, dht_max_peers_reply, dht_search_branching, dht_max_fail_count, dht_max_torrents, dht_max_dht_items, dht_max_peers, dht_max_torrent_search_reply, dht_block_timeout, dht_block_ratelimit, dht_item_lifetime, dht_sample_infohashes_interval, dht_max_infohashes_sample_count, max_piece_count, metadata_token_limit, min_websocket_announce_interval, webtorrent_connection_timeout, max_int_setting_internal };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/libtorrent4j/AddTorrentParamsTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Alden Torres
* Copyright (c) 2018-2022, Alden Torres
*
* Licensed under the terms of the MIT license.
* Copy of the license at https://opensource.org/licenses/MIT
Expand Down Expand Up @@ -27,7 +27,7 @@ public class AddTorrentParamsTest {
@Test
public void testVersion() {
AddTorrentParams params = new AddTorrentParams();
assertEquals(20005, params.getVersion());
assertEquals(20006, params.getVersion());
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/libtorrent4j/SettingsPackTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, Alden Torres
* Copyright (c) 2020-2022, Alden Torres
*
* Licensed under the terms of the MIT license.
* Copy of the license at https://opensource.org/licenses/MIT
Expand Down Expand Up @@ -28,7 +28,7 @@ public void testDefaultSettings() {

String value = new String(fingerprint, 0, 8, StandardCharsets.US_ASCII);

assertEquals("-LT2050-", value);
assertEquals("-LT2060-", value);
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/libtorrent4j/VersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public class VersionTest {

@Test
public void testLibtorrent4jVersionValue() {
assertTrue(LibTorrent.libtorrent4jVersion().startsWith("2.0.5-"));
assertTrue(LibTorrent.libtorrent4jVersion().startsWith("2.0.6-"));
}

@Test
public void testVersionValue() {
assertEquals("2.0.5.0", LibTorrent.version());
assertEquals("2.0.6.0", LibTorrent.version());
}
}
2 changes: 1 addition & 1 deletion src/test/java/org/libtorrent4j/swig/LibTorrentTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2021, Alden Torres
* Copyright (c) 2018-2022, Alden Torres
*
* Licensed under the terms of the MIT license.
* Copy of the license at https://opensource.org/licenses/MIT
Expand Down
2 changes: 1 addition & 1 deletion swig/deps/libtorrent
Submodule libtorrent updated 44 files
+11 −0 ChangeLog
+1 −1 Jamfile
+1 −1 Makefile
+1 −0 bindings/c/include/libtorrent_settings.h
+1 −0 bindings/c/src/settings.cpp
+1 −1 bindings/python/setup.py
+13 −1 bindings/python/tests/client_test.py
+1 −1 cmake/Modules/GeneratePkgConfig.cmake
+8 −0 cmake/Modules/GeneratePkgConfig/generate-pkg-config.cmake.in
+1 −1 docs/gen_settings_doc.py
+1 −1 docs/header.rst
+1 −1 docs/hunspell/libtorrent.dic
+2 −1 examples/client_test.cpp
+1 −1 examples/connection_tester.cpp
+17 −12 include/libtorrent/aux_/http_connection.hpp
+2 −0 include/libtorrent/aux_/listen_socket_handle.hpp
+1 −1 include/libtorrent/aux_/session_impl.hpp
+0 −1 include/libtorrent/aux_/tracker_manager.hpp
+32 −15 include/libtorrent/bdecode.hpp
+2 −1 include/libtorrent/natpmp.hpp
+12 −3 include/libtorrent/settings_pack.hpp
+8 −1 include/libtorrent/upnp.hpp
+6 −6 include/libtorrent/version.hpp
+70 −0 simulation/test_checking.cpp
+2 −2 simulation/test_http_connection.cpp
+18 −7 src/bdecode.cpp
+0 −6 src/enum_net.cpp
+15 −15 src/http_connection.cpp
+4 −2 src/http_tracker_connection.cpp
+8 −0 src/listen_socket_handle.cpp
+2 −1 src/mmap_disk_io.cpp
+1 −1 src/natpmp.cpp
+10 −10 src/peer_connection.cpp
+21 −20 src/session_impl.cpp
+8 −3 src/settings_pack.cpp
+2 −8 src/torrent.cpp
+0 −5 src/tracker_manager.cpp
+17 −10 src/upnp.cpp
+26 −0 test/test_bdecode.cpp
+6 −5 test/test_copy_file.cpp
+1 −1 test/test_http_connection.cpp
+3 −0 test/test_settings_pack.cpp
+5 −3 test/test_upnp.cpp
+22 −16 tools/benchmark_checking.py
1 change: 1 addition & 0 deletions swig/libtorrent/settings_pack.i
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
%ignore libtorrent::settings_pack::deprecated_read_cache_line_size;
%ignore libtorrent::settings_pack::deprecated_write_cache_line_size;
%ignore libtorrent::settings_pack::deprecated_allow_partial_disk_writes;
%ignore libtorrent::settings_pack::peer_tos;
%ignore libtorrent::apply_pack_impl;
%ignore libtorrent::setting_by_name;
%ignore libtorrent::non_default_settings;
Expand Down
12 changes: 12 additions & 0 deletions swig/libtorrent_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70649,6 +70649,18 @@ SWIGEXPORT jint JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_settings_1pac
}


SWIGEXPORT jint JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_settings_1pack_1active_1downloads_1get(JNIEnv *jenv, jclass jcls) {
jint jresult = 0 ;
libtorrent::settings_pack::int_types result;

(void)jenv;
(void)jcls;
result = (libtorrent::settings_pack::int_types)libtorrent::settings_pack::active_downloads;
jresult = (jint)result;
return jresult;
}


SWIGEXPORT jint JNICALL Java_org_libtorrent4j_swig_libtorrent_1jni_settings_1pack_1auto_1manage_1interval_1get(JNIEnv *jenv, jclass jcls) {
jint jresult = 0 ;
libtorrent::settings_pack::int_types result;
Expand Down

0 comments on commit 863b09a

Please sign in to comment.