merged python binding fix from RC_0_16
This commit is contained in:
parent
17118f4c1d
commit
40805503d6
|
@ -6,6 +6,7 @@
|
|||
* fix uTP edge case where udp socket buffer fills up
|
||||
* fix nagle implementation in uTP
|
||||
|
||||
* fix a bunch of typos in python bindings
|
||||
* make get_settings available in the python binding regardless of deprecated functions
|
||||
* fix typo in python settings binding
|
||||
* fix possible dangling pointer use in peer list
|
||||
|
|
|
@ -108,6 +108,11 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
if (!sett_dict.has_key("outgoing_port"))
|
||||
sett.outgoing_ports.first = extract<int>(sett_dict["outgoing_port"]);
|
||||
if (!sett_dict.has_key("num_outgoing_ports"))
|
||||
sett.outgoing_ports.second = sett.outgoing_ports.first + extract<int>(sett_dict["num_outgoing_ports"]);
|
||||
|
||||
ses.set_settings(sett);
|
||||
}
|
||||
|
||||
|
@ -145,6 +150,8 @@ namespace
|
|||
break;
|
||||
}
|
||||
}
|
||||
sett_dict["outgoing_port"] = sett.outgoing_ports.first;
|
||||
sett_dict["num_outgoing_ports"] = sett.outgoing_ports.second - sett.outgoing_ports.first + 1;
|
||||
return sett_dict;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ void bind_session_settings()
|
|||
.def_readwrite("num_want", &session_settings::num_want)
|
||||
.def_readwrite("initial_picker_threshold", &session_settings::initial_picker_threshold)
|
||||
.def_readwrite("allowed_fast_set_size", &session_settings::allowed_fast_set_size)
|
||||
.def_readwrite("suggest_mode", &session_settings::suggest_mode)
|
||||
.def_readwrite("max_queued_disk_bytes", &session_settings::max_queued_disk_bytes)
|
||||
.def_readwrite("max_queued_disk_bytes_low_watermark", &session_settings::max_queued_disk_bytes_low_watermark)
|
||||
.def_readwrite("handshake_timeout", &session_settings::handshake_timeout)
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
.def_readwrite("use_dht_as_fallback", &session_settings::use_dht_as_fallback)
|
||||
|
@ -56,11 +58,13 @@ void bind_session_settings()
|
|||
.def_readwrite("auto_upload_slots_rate_based", &session_settings::auto_upload_slots_rate_based)
|
||||
#endif
|
||||
.def_readwrite("choking_algorithm", &session_settings::choking_algorithm)
|
||||
.def_readwrite("seed_choking_algorithm", &session_settings::seed_choking_algorithm)
|
||||
.def_readwrite("use_parole_mode", &session_settings::use_parole_mode)
|
||||
.def_readwrite("cache_size", &session_settings::cache_size)
|
||||
.def_readwrite("cache_buffer_chunk_size", &session_settings::cache_buffer_chunk_size)
|
||||
.def_readwrite("cache_expiry", &session_settings::cache_expiry)
|
||||
.def_readwrite("use_read_cache", &session_settings::use_read_cache)
|
||||
.def_readwrite("explicit_read_cache", &session_settings::explicit_read_cache)
|
||||
.def_readwrite("disk_io_write_mode", &session_settings::disk_io_write_mode)
|
||||
.def_readwrite("disk_io_read_mode", &session_settings::disk_io_read_mode)
|
||||
.def_readwrite("coalesce_reads", &session_settings::coalesce_reads)
|
||||
|
@ -127,10 +131,11 @@ void bind_session_settings()
|
|||
.def_readwrite("increase_est_reciprocation_rate", &session_settings::increase_est_reciprocation_rate)
|
||||
.def_readwrite("decrease_est_reciprocation_rate", &session_settings::decrease_est_reciprocation_rate)
|
||||
.def_readwrite("incoming_starts_queued_torrents", &session_settings::incoming_starts_queued_torrents)
|
||||
.def_readwrite("report_true_downoaded", &session_settings::report_true_downloaded)
|
||||
.def_readwrite("report_true_downloaded", &session_settings::report_true_downloaded)
|
||||
.def_readwrite("strict_end_game_mode", &session_settings::strict_end_game_mode)
|
||||
.def_readwrite("broadcast_lsd", &session_settings::broadcast_lsd)
|
||||
.def_readwrite("ignore_resume_timestamps", &session_settings::ignore_resume_timestamps)
|
||||
.def_readwrite("no_recheck_incomplete_resume", &session_settings::no_recheck_incomplete_resume)
|
||||
.def_readwrite("anonymous_mode", &session_settings::anonymous_mode)
|
||||
.def_readwrite("tick_interval", &session_settings::tick_interval)
|
||||
.def_readwrite("report_web_seed_downloads", &session_settings::report_web_seed_downloads)
|
||||
|
@ -162,7 +167,7 @@ void bind_session_settings()
|
|||
.def_readwrite("max_metadata_size", &session_settings::max_metadata_size)
|
||||
.def_readwrite("smooth_connects", &session_settings::smooth_connects)
|
||||
.def_readwrite("always_send_user_agent", &session_settings::always_send_user_agent)
|
||||
.def_readwrite("apply_ip_filter_to_trakers", &session_settings::apply_ip_filter_to_trackers)
|
||||
.def_readwrite("apply_ip_filter_to_trackers", &session_settings::apply_ip_filter_to_trackers)
|
||||
.def_readwrite("read_job_every", &session_settings::read_job_every)
|
||||
.def_readwrite("use_disk_read_ahead", &session_settings::use_disk_read_ahead)
|
||||
.def_readwrite("lock_files", &session_settings::lock_files)
|
||||
|
@ -170,6 +175,7 @@ void bind_session_settings()
|
|||
.def_readwrite("enable_incoming_tcp", &session_settings::enable_incoming_tcp)
|
||||
.def_readwrite("enable_outgoing_utp", &session_settings::enable_outgoing_utp)
|
||||
.def_readwrite("enable_incoming_utp", &session_settings::enable_incoming_utp)
|
||||
.def_readwrite("max_pex_peers", &session_settings::max_pex_peers)
|
||||
.def_readwrite("ssl_listen", &session_settings::ssl_listen)
|
||||
.def_readwrite("tracker_backoff", &session_settings::tracker_backoff)
|
||||
.def_readwrite("ban_web_seeds", &session_settings::ban_web_seeds)
|
||||
|
@ -198,6 +204,17 @@ void bind_session_settings()
|
|||
.value("bittyrant_choker", session_settings::bittyrant_choker)
|
||||
;
|
||||
|
||||
enum_<session_settings::seed_choking_algorithm_t>("seed_choking_algorithm_t")
|
||||
.value("round_robin", session_settings::round_robin)
|
||||
.value("fastest_upload", session_settings::fastest_upload)
|
||||
.value("anti_leech", session_settings::anti_leech)
|
||||
;
|
||||
|
||||
enum_<session_settings::suggest_mode_t>("suggest_mode_t")
|
||||
.value("no_piece_suggestions", session_settings::no_piece_suggestions)
|
||||
.value("suggest_read_cache", session_settings::suggest_read_cache)
|
||||
;
|
||||
|
||||
enum_<session_settings::io_buffer_mode_t>("io_buffer_mode_t")
|
||||
.value("enable_os_cache", session_settings::enable_os_cache)
|
||||
.value("disable_os_cache_for_aligned_files", session_settings::disable_os_cache_for_aligned_files)
|
||||
|
|
|
@ -259,7 +259,7 @@ namespace libtorrent
|
|||
// suggest read cache will make libtorrent suggest pieces
|
||||
// that are fresh in the disk read cache, to potentially
|
||||
// lower disk access and increase the cache hit ratio
|
||||
enum { no_piece_suggestions = 0, suggest_read_cache = 1 };
|
||||
enum suggest_mode_t { no_piece_suggestions = 0, suggest_read_cache = 1 };
|
||||
int suggest_mode;
|
||||
|
||||
// the maximum number of bytes a connection may have
|
||||
|
|
|
@ -388,6 +388,7 @@ namespace aux {
|
|||
TORRENT_SETTING(boolean, drop_skipped_requests)
|
||||
TORRENT_SETTING(boolean, low_prio_disk)
|
||||
TORRENT_SETTING(integer, local_service_announce_interval)
|
||||
TORRENT_SETTING(integer, dht_announce_interval)
|
||||
TORRENT_SETTING(integer, udp_tracker_token_expiry)
|
||||
TORRENT_SETTING(boolean, volatile_read_cache)
|
||||
TORRENT_SETTING(boolean, guided_read_cache)
|
||||
|
@ -410,6 +411,8 @@ namespace aux {
|
|||
TORRENT_SETTING(boolean, no_recheck_incomplete_resume)
|
||||
TORRENT_SETTING(boolean, anonymous_mode)
|
||||
TORRENT_SETTING(integer, tick_interval)
|
||||
TORRENT_SETTING(boolean, report_web_seed_downloads)
|
||||
TORRENT_SETTING(integer, share_mode_target)
|
||||
TORRENT_SETTING(integer, upload_rate_limit)
|
||||
TORRENT_SETTING(integer, download_rate_limit)
|
||||
TORRENT_SETTING(integer, local_upload_rate_limit)
|
||||
|
|
Loading…
Reference in New Issue