Commit Graph

10950 Commits

Author SHA1 Message Date
Arvid Norberg 0e49051f17 make create_random_files() take a span instead of pointer, length parameters 2018-06-11 01:35:31 +02:00
Arvid Norberg b26467c04e deprecate network-threads setting 2018-06-10 19:34:07 +02:00
Arvid Norberg e8f971a54a scrape_reply_alert should be high priority, since it's triggered by the client 2018-06-10 19:28:45 +02:00
Arvid Norberg 6647b0988d
add support for multi-home NAT-PMP and PCP 2018-06-10 16:55:42 +02:00
Arvid Norberg 1b62aff9d1 minor improvements to test_checking 2018-06-10 16:25:10 +02:00
Steven Siloti 247672820c report transport version in NAT-PMP send/receive logs 2018-06-09 16:40:46 -07:00
arvidn e7fe7f1b89 fix boost::get<> invocation for variant 2018-06-10 00:56:55 +02:00
Steven Siloti f039cffeb3 relax packet length check prior to checking response code
Don't assume that an unsupported version response will contain anything past
the response code.
2018-06-09 08:55:49 -07:00
Alden Torres a357e490ed minor code refactor, more use of auto 2018-06-08 21:56:06 +02:00
Steven Siloti 2cf1018fa0 enum_if: add default gateway column to interface table 2018-06-07 18:18:31 -07:00
Steven Siloti fbaa1afd62 return a vector of mapping ids from add_port_mapping 2018-06-07 18:18:31 -07:00
Steven Siloti e523566622 add support for the Port Control Protocol (PCP) 2018-06-07 18:18:31 -07:00
Steven Siloti f6720e31ed don't re-map all listen sockets when changing listen_interfaces
New sockets will be mapped regardless of the remap parameter. Requesting
full re-mapping just creates unecessary network traffic.
2018-06-07 18:16:08 -07:00
Steven Siloti 78be52112f create a natpmp instance for each listen socket 2018-06-07 18:16:08 -07:00
Steven Siloti 496cf46b25 enum_routes fixes on Linux 2018-06-07 18:09:51 -07:00
Steven Siloti 4a578b1450 fix scope_id in enum_routes on Windows 2018-06-07 18:09:51 -07:00
Steven Siloti 72cf4fd9ea Remove UNC prefixes from device names on Windows 2018-06-07 18:09:51 -07:00
Steven Siloti 603e206f36 fix netmask of routes on Windows
The build_netmask function was incorrectly dividing the size of the bytes_type
by 8. Also use b.size() instead of sizeof for consistency.

I'm not 100% certain what the difference between DestinationPrefix.PrefixLength
and SitePrefixLength is. It looks like SitePrefixLength is something specific to
site-local addresses. Emperically I found DestinationPrefix.PrefixLength
contains reasonable values while SitePrefixLength is always zero.
2018-06-07 18:09:51 -07:00
Arvid Norberg e88339378c merged RC_1_1 into master 2018-06-07 00:30:23 +02:00
Arvid Norberg 049d867c12 fixed race condition in random number generator 2018-06-06 09:54:49 +02:00
Arvid Norberg 2408200475 fix race condition in stat_cache 2018-06-05 19:07:33 +02:00
Arvid Norberg 794ccf4f79 remove unused disk stats counters 2018-06-05 19:03:04 +02:00
arvidn 95cfc16bca fix integer overflow in alert_manager 2018-06-02 15:16:08 +02:00
arvidn 267ca40b28 merged RC_1_1 into master 2018-06-02 13:15:13 +02:00
arvidn c55bc7dd42 improve error handling of failing to change file priority 2018-05-31 00:47:17 +02:00
Alden Torres 8a0ac58658 some lint oriented refactor, more use of const 2018-05-30 23:52:28 +02:00
arvidn c56f6abf72 deliver notification of alerts being dropped via alerts_dropped_alert 2018-05-30 11:26:02 +02:00
Alden Torres f9b43f3511 some cast cleanup, const modifier and lint refactor 2018-05-30 00:06:52 +02:00
Andrew Resch c2ea38fdfe Add set_alert_notify to python bindings (#3066) 2018-05-29 22:30:59 +02:00
Alden Torres 6c4869f044 moved instantiate_connection to aux namespace 2018-05-29 09:25:25 +02:00
Steven Siloti 396c5dd3af remove use of deprecated function readdir_r
Ports 140b8ace onto RC_1_1 branch
2018-05-28 16:06:41 +02:00
arvidn 3b0ce8d2e1 merged RC_1_1 into master 2018-05-28 15:56:22 +02:00
sledgehammer_999 4cef1814b0 Add 1.1.7 release in the ChangeLog 2018-05-28 09:44:26 +02:00
Eugene Shalygin e15077fc3f Fix pkg-config branch in the example CMake find module
1. The imported target properties may not contain -D switches in the
INTERFACE_COMPILE_DEFINITIONS property, because CMake will always
prepend them to each item. Therefore we have to remove those switches
and also pass other options (e.g. -fexceptions) in INTERFACE_COMPILE_OPTIONS
property, otherwise CMake creates "mutants" '-D-fexceptions' alike.

2. FindOpenSSL.cmake variable for include directory is
OPENSSL_INCLUDE_DIR, not OPENSSL_INCLUDE_DIRS.
2018-05-27 23:01:22 +02:00
Eugene Shalygin b1d7dd89c1 Reflect Boost version and C++11/14 interconnection in CMake build
C++ standard and Boost requirements are connected:
1. With C++11 onward, we require Boost system component, with
C++03 we need chrono and random components too
2. When building against boost 1.66 and newer, C++11 is required.

Closes #3011, partially closes #2966.
2018-05-27 22:59:13 +02:00
arvidn 35d7672432 raise priority of fastresum_rejected_alert 2018-05-27 22:33:24 +02:00
Eugene Shalygin 287f299314 cmake: pass target C++ standard to pkgconfig generator 2018-05-27 09:55:13 +02:00
Alden Torres d6cecee8c0 some code cleanup and minor refactor 2018-05-24 23:46:37 +02:00
arvidn 6ec6c1b340 since moving an existing file into the part file isn't supported, just don't use the partfile for existing files when their priority is set to 0 2018-05-24 23:45:28 +02:00
arvidn 534276e7a5 refactor to use the utility function for bind_socket_to_device() instead of using the bind_to_device socket option directly, to make it best effort. include operation enum in udp_error alert. 2018-05-23 12:11:04 +02:00
Alden Torres ff300ed224 some cleanup and refactor in torrent_info code (#3054) 2018-05-23 10:39:55 +02:00
arvidn 77191a3820 fix hidden attribute in file class 2018-05-23 10:39:10 +02:00
arvidn ed8fffc1a6 set the hidden attribute when creating the part file 2018-05-23 10:39:10 +02:00
arvidn 55a0a6e0df fix production asserts 2018-05-22 12:12:33 +02:00
Steven Siloti 92a7188163 only start a new accept request on new listen sockets
Existing sockets already have an outstanding accept.
Also fix mapping new listen sockets when re-mapping is not requested.
2018-05-22 11:06:33 +02:00
arvidn 1a66a8b285 merged RC_1_1 into master 2018-05-20 12:08:46 +02:00
arvidn c986d93913 fix properly ignoring failure to get local endpoint of a socket while printing an error 2018-05-20 10:47:46 +02:00
arvidn a137bbfdd4 simplify some using statements to pull in the address types 2018-05-20 08:46:14 +02:00
Steven Siloti 54f00ce09d don't change state to downloading if the torrent is finished
Move the transition to downloading after the torrent has been checked
for being finished. This prevents a spurious state_changed_alert when
adding a torrent which is already completed.

Also move the posting of the torrent_checked_alert to maintain the
historical ordering of that alert with respect to the transition out of
checking_resume_data.
2018-05-20 08:45:24 +02:00
d_komarov 5f74b6e353 Bump `file_error_alert` priority
This alert's priority must be higher than `block_downloading_alert`'s
to allow custom handling of file errors.

With progress notifications enabled, network thread might fully load
alerts queue, so file errors from disk thread won't have a chance to
be delivered.
2018-05-17 00:55:07 +02:00