arvidn
6b55096ebd
switch some using declarations to new-style typedefs. remove some redundant parenthesis
2017-09-18 09:38:51 +02:00
Steven Siloti
0232dc35cd
deprecate lock_files ( #2344 )
...
File locking interacts poorly with the path to replace a read only file handle
with a read/write one. For performance reasons the old handle is not closed
until the new one is put in place. With file locking this obviously cannot
work because the first handle is holding a lock on the file. As a result,
file_pool::open_file fails in this case. Even if we dropped the reference to
the read only file handle before attempting to re-open it, the open could still
fail if another thread is holding a reference to the read only handle.
There doesn't seem to be a good way around this. The simple solution would be
to always open files in read/write mode, but that has obvious safety downsides.
Any other solution would significantly complicate the file pool code.
Deprecating file locking seems to be the least bad option.
2017-09-17 10:43:27 +02:00
Alden Torres
cb114a80e1
reverted ino_t cast and added fix only for android
2017-08-04 21:22:20 +02:00
arvidn
6fa181ece8
some cleanup of type-safe flags
2017-07-30 18:20:15 -07:00
Steven Siloti
140b8ace8d
remove use of deprecated function readdir_r
2017-07-22 22:40:17 -07:00
arvidn
c4afb5e949
use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics
2017-07-15 01:15:57 -07:00
arvidn
5c37eb174f
drop support for windows compilers without std::string and wchar_t (believed to be old cygwin)
2017-07-02 08:24:55 -04:00
arvidn
ffaabd846c
make file open mode flags be an enum class for type-safety
2017-05-28 11:16:59 -04:00
arvidn
749d0da875
make iovec_t an alias for span<char>, in preparation for removing it altogether in favour of span
2017-04-30 11:49:08 -04:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00
arvidn
79d7ae3638
separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class
2017-04-11 18:07:55 -04:00
Arvid Norberg
13b16a63a3
use unsigned type for file flags. make file_pool private to disk_io_thread ( #1894 )
...
use unsigned type for file flags. make file_pool private to disk_io_thread. move close_file_interval logic to the disk thread. don't expose file in public interface, and make pool_file_status properly public (not part of file_pool and renamed to open_file_status), this is exposed in public interface via torrent_handle::file_status()
2017-04-08 18:24:50 -04:00
Alden Torres
a8b10a7449
more sign warnings fixes ( #1775 )
...
more sign warnings fixes
2017-03-09 07:46:52 -05:00
Andrei Kurushin
9bee2146d0
complete UNC path support ( #1689 )
...
complete UNC path support. all internal file api functions handle long size paths (> MAX_PATH) and special names (CON,PRN ...) with unit test
2017-02-16 23:47:08 -05:00
Arvid Norberg
3d06371f31
factor out some common storage utilities out of storage.cpp ( #1515 )
...
factor out some common storage utilities out of storage.cpp
2017-01-11 00:42:10 -05:00
arvidn
d1ea80c2c3
remove disk-access-log build configuration
2017-01-09 08:37:02 -05:00
arvidn
1d1ab4f4b5
removed file-leak code, temporarily used to trouble-shoot files appearing to be left open
2017-01-09 01:43:15 -05:00
Andrei Kurushin
1ec5c69dcd
minor code corrections ( #1430 )
...
use compact span cast. extend split_path api with only_first_part flag. use single loadlibrary and getprocaddress for IP helper
2016-12-26 22:45:48 -08:00
arvidn
93f400265b
revert change to use std::time_t (mingw64 has abi issues)
2016-12-22 01:13:17 -05:00
Alden Torres
eaf99aa42b
fixed more warnings of shorten-64-to-32 and sign-compare in android ( #1425 )
...
fixed more warnings of -Wshorten-64-to-32 in android. changed file_status to use std::time and disable warnings of NLMSG_OK in clang
2016-12-18 10:59:41 -05:00
Steven Siloti
ca07ee83a3
mark all converstion to bool operators as explicit
2016-12-12 01:34:36 -05:00
Steven Siloti
f5366bd816
use span for scatter/gather lists ( #1260 )
...
use span for gather/scatter buffers. remove explicit size parameter from file_op
2016-10-26 20:40:56 -04:00
Arvid Norberg
20f65946f2
make single-argument constructors explicit ( #1194 )
...
make single-argument constructors explicit
2016-10-08 14:07:11 -04:00
Alden Torres
bf0008933a
refactor to use std::shared_ptr with peer_connection, core and tests ( #1050 )
2016-08-31 21:42:18 -04:00
arvidn
8c8c3d5587
replace boost::function with std::function
2016-08-13 07:07:26 -04:00
Arvid Norberg
e36e5efaba
use boost::string_ref ( #996 )
...
use boost::string_ref/boost::string_view in various parts of the code, in file_storage, some file functions and in bdecode.
2016-08-13 07:04:53 -04:00
Arvid Norberg
6aabe3762b
general modernization ( #836 )
...
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
Arvid Norberg
ed077c8358
use cstdint intead of boost/cstdint.hpp ( #833 )
...
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg
e8380e1d0b
factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows ( #732 )
2016-05-17 09:24:06 -04:00
Arvid Norberg
29902be3a0
some general C++ 11 cleanup. some typedefs and for loops ( #709 )
2016-05-07 18:46:42 -04:00
Vladimir Golovnev
64cb8b236a
Move storage "file-by-file" ( #632 )
...
When moving storage for a torrent, only move files belonging to the torrent, one by one.
2016-04-30 22:18:38 -04:00
Arvid Norberg
20b41ad0b9
Threads ( #671 )
...
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
arvidn
139fb29647
remove unused O_DIRECT mode, and relax/simplify alignment requirements for coalesce_buffers
2016-03-20 00:55:31 -04:00
Alden Torres
5c94b286b0
Removed file::m_path windows specific field
...
Removed default_storage::sparse_end
Typos
2016-01-21 12:11:33 -05:00
arvidn
1f9f588e75
merge copyright year update and changelog from RC_1_0
2016-01-17 18:57:46 -05:00
Alden Torres
20d8f4e3f7
Removed unused fields in field class
2016-01-11 12:07:36 -05:00
Alden Torres
b20096f0db
Comments typos
2016-01-02 11:46:10 -05:00
arvidn
fb2f2731cf
fix support for incomplete reads/writes from disk
2015-11-14 00:21:03 -05:00
Arvid Norberg
d43f7b56a2
update copyright year
2015-06-03 05:18:48 +00:00
Arvid Norberg
3951377d95
fix include paths for warning push and pop headers
2015-04-21 01:16:28 +00:00
Arvid Norberg
408232cfc8
raise warning level. fix a few of them. filter out warnings from boost
2015-04-18 02:33:39 +00:00
Arvid Norberg
ccc7e45406
landed mutable torrents branch in trunk
2015-03-21 00:12:40 +00:00
Arvid Norberg
89055c4c7a
some more optimizations on loading torrents
2015-02-18 03:32:49 +00:00
Arvid Norberg
0f37e3403c
transition from intrusive_ptr to shared_ptr. don't export initialize_default_settings
2015-01-06 08:08:49 +00:00
Arvid Norberg
f77e12ac04
clean up symbol exports
2015-01-01 20:25:39 +00:00
Arvid Norberg
ae47823970
don't fail renaming a file in a torrent just because it doesn't exist (and the destination directory doesn't exist)
2014-12-26 21:25:37 +00:00
Arvid Norberg
1ed1963f29
remove size_type typedef in favor of boost::int64_t
2014-12-03 04:32:50 +00:00
Arvid Norberg
0b711f1280
remove unused variables. add some comments
2014-11-17 03:10:00 +00:00
Arvid Norberg
7351389ce8
land libtorrent_aio branch in trunk
2014-07-06 19:18:00 +00:00
Arvid Norberg
bfdb445890
merged SetFileValidData fix from RC_0_16
2014-02-23 19:13:53 +00:00