diff --git a/libtorrent/include/libtorrent/asio/basic_datagram_socket.hpp b/libtorrent/include/libtorrent/asio/basic_datagram_socket.hpp index 64d4d7244..0bfc512c2 100644 --- a/libtorrent/include/libtorrent/asio/basic_datagram_socket.hpp +++ b/libtorrent/include/libtorrent/asio/basic_datagram_socket.hpp @@ -2,7 +2,7 @@ // basic_datagram_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_deadline_timer.hpp b/libtorrent/include/libtorrent/asio/basic_deadline_timer.hpp index d881f6643..75d33b950 100644 --- a/libtorrent/include/libtorrent/asio/basic_deadline_timer.hpp +++ b/libtorrent/include/libtorrent/asio/basic_deadline_timer.hpp @@ -2,7 +2,7 @@ // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_io_object.hpp b/libtorrent/include/libtorrent/asio/basic_io_object.hpp index 5b1f94b8e..790498d46 100644 --- a/libtorrent/include/libtorrent/asio/basic_io_object.hpp +++ b/libtorrent/include/libtorrent/asio/basic_io_object.hpp @@ -2,7 +2,7 @@ // basic_io_object.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_socket.hpp b/libtorrent/include/libtorrent/asio/basic_socket.hpp index fbacf940d..5335614fa 100644 --- a/libtorrent/include/libtorrent/asio/basic_socket.hpp +++ b/libtorrent/include/libtorrent/asio/basic_socket.hpp @@ -2,7 +2,7 @@ // basic_socket.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,10 @@ #include "asio/detail/push_options.hpp" +#include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + #include "asio/basic_io_object.hpp" #include "asio/error.hpp" #include "asio/socket_base.hpp" @@ -295,7 +299,40 @@ public: * will be passed the asio::error::operation_aborted error. * * @throws asio::system_error Thrown on failure. + * + * @note Calls to cancel() will always fail with + * asio::error::operation_not_supported when run on Windows XP, Windows + * Server 2003, and earlier versions of Windows, unless + * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has + * two issues that should be considered before enabling its use: + * + * @li It will only cancel asynchronous operations that were initiated in the + * current thread. + * + * @li It can appear to complete without error, but the request to cancel the + * unfinished operations may be silently ignored by the operating system. + * Whether it works or not seems to depend on the drivers that are installed. + * + * For portable cancellation, consider using one of the following + * alternatives: + * + * @li Disable asio's I/O completion port backend by defining + * ASIO_DISABLE_IOCP. + * + * @li Use the close() function to simultaneously cancel the outstanding + * operations and close the socket. + * + * When running on Windows Vista, Windows Server 2008, and later, the + * CancelIoEx function is always used. This function does not have the + * problems described above. */ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) \ + && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \ + && !defined(ASIO_ENABLE_CANCELIO) + __declspec(deprecated("By default, this function always fails with " + "operation_not_supported when used on Windows XP, Windows Server 2003, " + "or earlier. Consult documentation for details.")) +#endif void cancel() { asio::error_code ec; @@ -310,7 +347,40 @@ public: * will be passed the asio::error::operation_aborted error. * * @param ec Set to indicate what error occurred, if any. + * + * @note Calls to cancel() will always fail with + * asio::error::operation_not_supported when run on Windows XP, Windows + * Server 2003, and earlier versions of Windows, unless + * ASIO_ENABLE_CANCELIO is defined. However, the CancelIo function has + * two issues that should be considered before enabling its use: + * + * @li It will only cancel asynchronous operations that were initiated in the + * current thread. + * + * @li It can appear to complete without error, but the request to cancel the + * unfinished operations may be silently ignored by the operating system. + * Whether it works or not seems to depend on the drivers that are installed. + * + * For portable cancellation, consider using one of the following + * alternatives: + * + * @li Disable asio's I/O completion port backend by defining + * ASIO_DISABLE_IOCP. + * + * @li Use the close() function to simultaneously cancel the outstanding + * operations and close the socket. + * + * When running on Windows Vista, Windows Server 2008, and later, the + * CancelIoEx function is always used. This function does not have the + * problems described above. */ +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) \ + && (!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600) \ + && !defined(ASIO_ENABLE_CANCELIO) + __declspec(deprecated("By default, this function always fails with " + "operation_not_supported when used on Windows XP, Windows Server 2003, " + "or earlier. Consult documentation for details.")) +#endif asio::error_code cancel(asio::error_code& ec) { return this->service.cancel(this->implementation, ec); diff --git a/libtorrent/include/libtorrent/asio/basic_socket_acceptor.hpp b/libtorrent/include/libtorrent/asio/basic_socket_acceptor.hpp index a2d6a0356..43a4fa4f2 100644 --- a/libtorrent/include/libtorrent/asio/basic_socket_acceptor.hpp +++ b/libtorrent/include/libtorrent/asio/basic_socket_acceptor.hpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_socket_iostream.hpp b/libtorrent/include/libtorrent/asio/basic_socket_iostream.hpp index c48da7b62..1d705ff77 100644 --- a/libtorrent/include/libtorrent/asio/basic_socket_iostream.hpp +++ b/libtorrent/include/libtorrent/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -49,6 +49,7 @@ : std::basic_iostream(&this->boost::base_from_member< \ basic_socket_streambuf >::member) \ { \ + tie(this); \ if (rdbuf()->connect(BOOST_PP_ENUM_PARAMS(n, x)) == 0) \ this->setstate(std::ios_base::failbit); \ } \ @@ -88,6 +89,7 @@ public: : std::basic_iostream(&this->boost::base_from_member< basic_socket_streambuf >::member) { + tie(this); } #if defined(GENERATING_DOCUMENTATION) diff --git a/libtorrent/include/libtorrent/asio/basic_socket_streambuf.hpp b/libtorrent/include/libtorrent/asio/basic_socket_streambuf.hpp index 2c4189c52..0bcd3b7a9 100644 --- a/libtorrent/include/libtorrent/asio/basic_socket_streambuf.hpp +++ b/libtorrent/include/libtorrent/asio/basic_socket_streambuf.hpp @@ -2,7 +2,7 @@ // basic_socket_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_stream_socket.hpp b/libtorrent/include/libtorrent/asio/basic_stream_socket.hpp index 59889dc33..c1e0ef039 100644 --- a/libtorrent/include/libtorrent/asio/basic_stream_socket.hpp +++ b/libtorrent/include/libtorrent/asio/basic_stream_socket.hpp @@ -2,7 +2,7 @@ // basic_stream_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/basic_streambuf.hpp b/libtorrent/include/libtorrent/asio/basic_streambuf.hpp index 016445e0f..5b14f5ef8 100644 --- a/libtorrent/include/libtorrent/asio/basic_streambuf.hpp +++ b/libtorrent/include/libtorrent/asio/basic_streambuf.hpp @@ -2,7 +2,7 @@ // basic_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffer.hpp b/libtorrent/include/libtorrent/asio/buffer.hpp index 57df33edf..99fb1e2c8 100644 --- a/libtorrent/include/libtorrent/asio/buffer.hpp +++ b/libtorrent/include/libtorrent/asio/buffer.hpp @@ -2,7 +2,7 @@ // buffer.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_read_stream.hpp b/libtorrent/include/libtorrent/asio/buffered_read_stream.hpp index bd9169b8f..673cce38d 100644 --- a/libtorrent/include/libtorrent/asio/buffered_read_stream.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_read_stream.hpp @@ -2,7 +2,7 @@ // buffered_read_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_read_stream_fwd.hpp b/libtorrent/include/libtorrent/asio/buffered_read_stream_fwd.hpp index df4270366..2f646a601 100644 --- a/libtorrent/include/libtorrent/asio/buffered_read_stream_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_read_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_read_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_stream.hpp b/libtorrent/include/libtorrent/asio/buffered_stream.hpp index 57959059e..a02dc88c1 100644 --- a/libtorrent/include/libtorrent/asio/buffered_stream.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_stream.hpp @@ -2,7 +2,7 @@ // buffered_stream.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_stream_fwd.hpp b/libtorrent/include/libtorrent/asio/buffered_stream_fwd.hpp index 10d1c384e..987e11374 100644 --- a/libtorrent/include/libtorrent/asio/buffered_stream_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_write_stream.hpp b/libtorrent/include/libtorrent/asio/buffered_write_stream.hpp index d06787091..0ebd3454e 100644 --- a/libtorrent/include/libtorrent/asio/buffered_write_stream.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_write_stream.hpp @@ -2,7 +2,7 @@ // buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/buffered_write_stream_fwd.hpp b/libtorrent/include/libtorrent/asio/buffered_write_stream_fwd.hpp index 84cf36e3a..4e33c8a3d 100644 --- a/libtorrent/include/libtorrent/asio/buffered_write_stream_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/buffered_write_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_write_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/completion_condition.hpp b/libtorrent/include/libtorrent/asio/completion_condition.hpp index 939a4a8f3..b4d59089a 100644 --- a/libtorrent/include/libtorrent/asio/completion_condition.hpp +++ b/libtorrent/include/libtorrent/asio/completion_condition.hpp @@ -2,7 +2,7 @@ // completion_condition.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/datagram_socket_service.hpp b/libtorrent/include/libtorrent/asio/datagram_socket_service.hpp index 69de5f2cc..9328f3607 100644 --- a/libtorrent/include/libtorrent/asio/datagram_socket_service.hpp +++ b/libtorrent/include/libtorrent/asio/datagram_socket_service.hpp @@ -2,7 +2,7 @@ // datagram_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/deadline_timer.hpp b/libtorrent/include/libtorrent/asio/deadline_timer.hpp index 2079c5d61..0ea373787 100644 --- a/libtorrent/include/libtorrent/asio/deadline_timer.hpp +++ b/libtorrent/include/libtorrent/asio/deadline_timer.hpp @@ -2,7 +2,7 @@ // deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/deadline_timer_service.hpp b/libtorrent/include/libtorrent/asio/deadline_timer_service.hpp index e1d1bc97e..2a79b4909 100644 --- a/libtorrent/include/libtorrent/asio/deadline_timer_service.hpp +++ b/libtorrent/include/libtorrent/asio/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/bind_handler.hpp b/libtorrent/include/libtorrent/asio/detail/bind_handler.hpp index 497bcfcc2..f6200f2bf 100644 --- a/libtorrent/include/libtorrent/asio/detail/bind_handler.hpp +++ b/libtorrent/include/libtorrent/asio/detail/bind_handler.hpp @@ -2,7 +2,7 @@ // bind_handler.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/buffer_resize_guard.hpp b/libtorrent/include/libtorrent/asio/detail/buffer_resize_guard.hpp index 0dcbe6956..c40d2b26b 100644 --- a/libtorrent/include/libtorrent/asio/detail/buffer_resize_guard.hpp +++ b/libtorrent/include/libtorrent/asio/detail/buffer_resize_guard.hpp @@ -2,7 +2,7 @@ // buffer_resize_guard.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/buffered_stream_storage.hpp b/libtorrent/include/libtorrent/asio/detail/buffered_stream_storage.hpp index 2a84d876d..072377ae4 100644 --- a/libtorrent/include/libtorrent/asio/detail/buffered_stream_storage.hpp +++ b/libtorrent/include/libtorrent/asio/detail/buffered_stream_storage.hpp @@ -2,7 +2,7 @@ // buffered_stream_storage.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/call_stack.hpp b/libtorrent/include/libtorrent/asio/detail/call_stack.hpp index 1373f46c7..738769927 100644 --- a/libtorrent/include/libtorrent/asio/detail/call_stack.hpp +++ b/libtorrent/include/libtorrent/asio/detail/call_stack.hpp @@ -2,7 +2,7 @@ // call_stack.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/const_buffers_iterator.hpp b/libtorrent/include/libtorrent/asio/detail/const_buffers_iterator.hpp index 964294865..6ac3ac593 100644 --- a/libtorrent/include/libtorrent/asio/detail/const_buffers_iterator.hpp +++ b/libtorrent/include/libtorrent/asio/detail/const_buffers_iterator.hpp @@ -2,7 +2,7 @@ // const_buffers_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/consuming_buffers.hpp b/libtorrent/include/libtorrent/asio/detail/consuming_buffers.hpp index cbe38a926..d598b0129 100644 --- a/libtorrent/include/libtorrent/asio/detail/consuming_buffers.hpp +++ b/libtorrent/include/libtorrent/asio/detail/consuming_buffers.hpp @@ -2,7 +2,7 @@ // consuming_buffers.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/deadline_timer_service.hpp b/libtorrent/include/libtorrent/asio/detail/deadline_timer_service.hpp index 06b90b5eb..1acbd15e4 100644 --- a/libtorrent/include/libtorrent/asio/detail/deadline_timer_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor.hpp b/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor.hpp index 15babcdb9..1f24c5a1a 100644 --- a/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor.hpp +++ b/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor_fwd.hpp index 230a6fd12..f3c6da181 100644 --- a/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/dev_poll_reactor_fwd.hpp @@ -2,7 +2,7 @@ // dev_poll_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/epoll_reactor.hpp b/libtorrent/include/libtorrent/asio/detail/epoll_reactor.hpp index 68b6fff4c..e318ed666 100644 --- a/libtorrent/include/libtorrent/asio/detail/epoll_reactor.hpp +++ b/libtorrent/include/libtorrent/asio/detail/epoll_reactor.hpp @@ -2,7 +2,7 @@ // epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/epoll_reactor_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/epoll_reactor_fwd.hpp index 87fad6325..601ce818d 100644 --- a/libtorrent/include/libtorrent/asio/detail/epoll_reactor_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/epoll_reactor_fwd.hpp @@ -2,7 +2,7 @@ // epoll_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/event.hpp b/libtorrent/include/libtorrent/asio/detail/event.hpp index 766f51716..1f959d7cc 100644 --- a/libtorrent/include/libtorrent/asio/detail/event.hpp +++ b/libtorrent/include/libtorrent/asio/detail/event.hpp @@ -2,7 +2,7 @@ // event.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/fd_set_adapter.hpp b/libtorrent/include/libtorrent/asio/detail/fd_set_adapter.hpp index 1d01dc5fb..5ae31b15a 100644 --- a/libtorrent/include/libtorrent/asio/detail/fd_set_adapter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/fd_set_adapter.hpp @@ -2,7 +2,7 @@ // fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/handler_alloc_helpers.hpp b/libtorrent/include/libtorrent/asio/detail/handler_alloc_helpers.hpp index 68e7cb15d..22b54e7ec 100644 --- a/libtorrent/include/libtorrent/asio/detail/handler_alloc_helpers.hpp +++ b/libtorrent/include/libtorrent/asio/detail/handler_alloc_helpers.hpp @@ -2,7 +2,7 @@ // handler_alloc_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/handler_invoke_helpers.hpp b/libtorrent/include/libtorrent/asio/detail/handler_invoke_helpers.hpp index b260c426c..9bdb049e0 100644 --- a/libtorrent/include/libtorrent/asio/detail/handler_invoke_helpers.hpp +++ b/libtorrent/include/libtorrent/asio/detail/handler_invoke_helpers.hpp @@ -2,7 +2,7 @@ // handler_invoke_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/handler_queue.hpp b/libtorrent/include/libtorrent/asio/detail/handler_queue.hpp index cd9870279..63c78a7d0 100644 --- a/libtorrent/include/libtorrent/asio/detail/handler_queue.hpp +++ b/libtorrent/include/libtorrent/asio/detail/handler_queue.hpp @@ -2,7 +2,7 @@ // handler_queue.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/hash_map.hpp b/libtorrent/include/libtorrent/asio/detail/hash_map.hpp index 05cebdf58..8560e5879 100644 --- a/libtorrent/include/libtorrent/asio/detail/hash_map.hpp +++ b/libtorrent/include/libtorrent/asio/detail/hash_map.hpp @@ -2,7 +2,7 @@ // hash_map.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/io_control.hpp b/libtorrent/include/libtorrent/asio/detail/io_control.hpp index feb02d9d5..cc1867857 100644 --- a/libtorrent/include/libtorrent/asio/detail/io_control.hpp +++ b/libtorrent/include/libtorrent/asio/detail/io_control.hpp @@ -2,7 +2,7 @@ // io_control.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/kqueue_reactor.hpp b/libtorrent/include/libtorrent/asio/detail/kqueue_reactor.hpp index 6b09d4dbc..20163181b 100644 --- a/libtorrent/include/libtorrent/asio/detail/kqueue_reactor.hpp +++ b/libtorrent/include/libtorrent/asio/detail/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libtorrent/include/libtorrent/asio/detail/kqueue_reactor_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/kqueue_reactor_fwd.hpp index 5171f4215..c81858f3b 100644 --- a/libtorrent/include/libtorrent/asio/detail/kqueue_reactor_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/kqueue_reactor_fwd.hpp @@ -2,7 +2,7 @@ // kqueue_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libtorrent/include/libtorrent/asio/detail/local_free_on_block_exit.hpp b/libtorrent/include/libtorrent/asio/detail/local_free_on_block_exit.hpp index 8e1f6088d..e5e7a4d60 100644 --- a/libtorrent/include/libtorrent/asio/detail/local_free_on_block_exit.hpp +++ b/libtorrent/include/libtorrent/asio/detail/local_free_on_block_exit.hpp @@ -2,7 +2,7 @@ // local_free_on_block_exit.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/mutex.hpp b/libtorrent/include/libtorrent/asio/detail/mutex.hpp index 87d32ba3c..9c083f661 100644 --- a/libtorrent/include/libtorrent/asio/detail/mutex.hpp +++ b/libtorrent/include/libtorrent/asio/detail/mutex.hpp @@ -2,7 +2,7 @@ // mutex.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/noncopyable.hpp b/libtorrent/include/libtorrent/asio/detail/noncopyable.hpp index 8e9d54683..5164e07e6 100644 --- a/libtorrent/include/libtorrent/asio/detail/noncopyable.hpp +++ b/libtorrent/include/libtorrent/asio/detail/noncopyable.hpp @@ -2,7 +2,7 @@ // noncopyable.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/null_event.hpp b/libtorrent/include/libtorrent/asio/detail/null_event.hpp index 99bcbc6a4..51529e47b 100644 --- a/libtorrent/include/libtorrent/asio/detail/null_event.hpp +++ b/libtorrent/include/libtorrent/asio/detail/null_event.hpp @@ -2,7 +2,7 @@ // null_event.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/null_mutex.hpp b/libtorrent/include/libtorrent/asio/detail/null_mutex.hpp index 2f6a72084..d29aafca9 100644 --- a/libtorrent/include/libtorrent/asio/detail/null_mutex.hpp +++ b/libtorrent/include/libtorrent/asio/detail/null_mutex.hpp @@ -2,7 +2,7 @@ // null_mutex.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/null_signal_blocker.hpp b/libtorrent/include/libtorrent/asio/detail/null_signal_blocker.hpp index c10017d98..33f23cabe 100644 --- a/libtorrent/include/libtorrent/asio/detail/null_signal_blocker.hpp +++ b/libtorrent/include/libtorrent/asio/detail/null_signal_blocker.hpp @@ -2,7 +2,7 @@ // null_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/null_thread.hpp b/libtorrent/include/libtorrent/asio/detail/null_thread.hpp index c013a7701..f91ca53e0 100644 --- a/libtorrent/include/libtorrent/asio/detail/null_thread.hpp +++ b/libtorrent/include/libtorrent/asio/detail/null_thread.hpp @@ -2,7 +2,7 @@ // null_thread.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/null_tss_ptr.hpp b/libtorrent/include/libtorrent/asio/detail/null_tss_ptr.hpp index 9f3b0ad0c..0cbdae612 100644 --- a/libtorrent/include/libtorrent/asio/detail/null_tss_ptr.hpp +++ b/libtorrent/include/libtorrent/asio/detail/null_tss_ptr.hpp @@ -2,7 +2,7 @@ // null_tss_ptr.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/old_win_sdk_compat.hpp b/libtorrent/include/libtorrent/asio/detail/old_win_sdk_compat.hpp index e32552197..a935677e1 100644 --- a/libtorrent/include/libtorrent/asio/detail/old_win_sdk_compat.hpp +++ b/libtorrent/include/libtorrent/asio/detail/old_win_sdk_compat.hpp @@ -2,7 +2,7 @@ // old_win_sdk_compat.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/pipe_select_interrupter.hpp b/libtorrent/include/libtorrent/asio/detail/pipe_select_interrupter.hpp index c0ac2aab1..e0a224e33 100644 --- a/libtorrent/include/libtorrent/asio/detail/pipe_select_interrupter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/pipe_select_interrupter.hpp @@ -2,7 +2,7 @@ // pipe_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/pop_options.hpp b/libtorrent/include/libtorrent/asio/detail/pop_options.hpp index c8b0ed93b..7f5666211 100644 --- a/libtorrent/include/libtorrent/asio/detail/pop_options.hpp +++ b/libtorrent/include/libtorrent/asio/detail/pop_options.hpp @@ -2,7 +2,7 @@ // pop_options.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_event.hpp b/libtorrent/include/libtorrent/asio/detail/posix_event.hpp index 305ed873b..958a5e02e 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_event.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_event.hpp @@ -2,7 +2,7 @@ // posix_event.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_fd_set_adapter.hpp b/libtorrent/include/libtorrent/asio/detail/posix_fd_set_adapter.hpp index 28e717bb1..5519b9abc 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_fd_set_adapter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // posix_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_mutex.hpp b/libtorrent/include/libtorrent/asio/detail/posix_mutex.hpp index c2a01d0b0..4f6cbba9f 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_mutex.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_mutex.hpp @@ -2,7 +2,7 @@ // posix_mutex.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_signal_blocker.hpp b/libtorrent/include/libtorrent/asio/detail/posix_signal_blocker.hpp index 73d0581e1..5ab6e7ad2 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_signal_blocker.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_signal_blocker.hpp @@ -2,7 +2,7 @@ // posix_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_thread.hpp b/libtorrent/include/libtorrent/asio/detail/posix_thread.hpp index a4a3da23c..892ffe076 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_thread.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_thread.hpp @@ -2,7 +2,7 @@ // posix_thread.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/posix_tss_ptr.hpp b/libtorrent/include/libtorrent/asio/detail/posix_tss_ptr.hpp index 1becb8dc4..0944d3dbf 100644 --- a/libtorrent/include/libtorrent/asio/detail/posix_tss_ptr.hpp +++ b/libtorrent/include/libtorrent/asio/detail/posix_tss_ptr.hpp @@ -2,7 +2,7 @@ // posix_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/push_options.hpp b/libtorrent/include/libtorrent/asio/detail/push_options.hpp index 96ddf7d04..4e0524dc5 100644 --- a/libtorrent/include/libtorrent/asio/detail/push_options.hpp +++ b/libtorrent/include/libtorrent/asio/detail/push_options.hpp @@ -2,7 +2,7 @@ // push_options.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/reactive_socket_service.hpp b/libtorrent/include/libtorrent/asio/detail/reactive_socket_service.hpp index df70f8863..0ecabaa0e 100644 --- a/libtorrent/include/libtorrent/asio/detail/reactive_socket_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/reactive_socket_service.hpp @@ -2,7 +2,7 @@ // reactive_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/reactor_op_queue.hpp b/libtorrent/include/libtorrent/asio/detail/reactor_op_queue.hpp index 583636047..b419c7c3f 100644 --- a/libtorrent/include/libtorrent/asio/detail/reactor_op_queue.hpp +++ b/libtorrent/include/libtorrent/asio/detail/reactor_op_queue.hpp @@ -2,7 +2,7 @@ // reactor_op_queue.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp b/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp index dab6340a5..172a8fc6d 100644 --- a/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/resolver_service.hpp @@ -2,7 +2,7 @@ // resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/scoped_lock.hpp b/libtorrent/include/libtorrent/asio/detail/scoped_lock.hpp index 57f8cb8f6..70b672985 100644 --- a/libtorrent/include/libtorrent/asio/detail/scoped_lock.hpp +++ b/libtorrent/include/libtorrent/asio/detail/scoped_lock.hpp @@ -2,7 +2,7 @@ // scoped_lock.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/select_interrupter.hpp b/libtorrent/include/libtorrent/asio/detail/select_interrupter.hpp index de7fc9611..4277e4758 100644 --- a/libtorrent/include/libtorrent/asio/detail/select_interrupter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/select_interrupter.hpp @@ -2,7 +2,7 @@ // select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/select_reactor.hpp b/libtorrent/include/libtorrent/asio/detail/select_reactor.hpp index 079ec2de8..a21cf93f5 100644 --- a/libtorrent/include/libtorrent/asio/detail/select_reactor.hpp +++ b/libtorrent/include/libtorrent/asio/detail/select_reactor.hpp @@ -2,7 +2,7 @@ // select_reactor.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/select_reactor_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/select_reactor_fwd.hpp index 3e1687eae..d43bc8aaf 100644 --- a/libtorrent/include/libtorrent/asio/detail/select_reactor_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/select_reactor_fwd.hpp @@ -2,7 +2,7 @@ // select_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/service_base.hpp b/libtorrent/include/libtorrent/asio/detail/service_base.hpp index 4f375c921..906a3546c 100644 --- a/libtorrent/include/libtorrent/asio/detail/service_base.hpp +++ b/libtorrent/include/libtorrent/asio/detail/service_base.hpp @@ -2,7 +2,7 @@ // service_base.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/service_id.hpp b/libtorrent/include/libtorrent/asio/detail/service_id.hpp index 8ff19097b..e60406441 100644 --- a/libtorrent/include/libtorrent/asio/detail/service_id.hpp +++ b/libtorrent/include/libtorrent/asio/detail/service_id.hpp @@ -2,7 +2,7 @@ // service_id.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/service_registry.hpp b/libtorrent/include/libtorrent/asio/detail/service_registry.hpp index 3a9e9f620..dadcd4bf6 100644 --- a/libtorrent/include/libtorrent/asio/detail/service_registry.hpp +++ b/libtorrent/include/libtorrent/asio/detail/service_registry.hpp @@ -2,7 +2,7 @@ // service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/service_registry_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/service_registry_fwd.hpp index 596c24be3..136c0e9a3 100644 --- a/libtorrent/include/libtorrent/asio/detail/service_registry_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/service_registry_fwd.hpp @@ -2,7 +2,7 @@ // service_registry_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/signal_blocker.hpp b/libtorrent/include/libtorrent/asio/detail/signal_blocker.hpp index 3eb3ba495..e2148d763 100644 --- a/libtorrent/include/libtorrent/asio/detail/signal_blocker.hpp +++ b/libtorrent/include/libtorrent/asio/detail/signal_blocker.hpp @@ -2,7 +2,7 @@ // signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/signal_init.hpp b/libtorrent/include/libtorrent/asio/detail/signal_init.hpp index 3df395dc3..620182b34 100644 --- a/libtorrent/include/libtorrent/asio/detail/signal_init.hpp +++ b/libtorrent/include/libtorrent/asio/detail/signal_init.hpp @@ -2,7 +2,7 @@ // signal_init.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/socket_holder.hpp b/libtorrent/include/libtorrent/asio/detail/socket_holder.hpp index e45f4fd61..c60d21eef 100644 --- a/libtorrent/include/libtorrent/asio/detail/socket_holder.hpp +++ b/libtorrent/include/libtorrent/asio/detail/socket_holder.hpp @@ -2,7 +2,7 @@ // socket_holder.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp b/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp index 06ffe9f91..3d471b643 100644 --- a/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp +++ b/libtorrent/include/libtorrent/asio/detail/socket_ops.hpp @@ -2,7 +2,7 @@ // socket_ops.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -698,40 +698,40 @@ inline const char* inet_ntop(int af, const void* src, char* dest, size_t length, return 0; } - sockaddr_storage_type address; + union + { + socket_addr_type base; + sockaddr_storage_type storage; + sockaddr_in4_type v4; + sockaddr_in6_type v6; + } address; DWORD address_length; if (af == AF_INET) { address_length = sizeof(sockaddr_in4_type); - sockaddr_in4_type* ipv4_address = - reinterpret_cast(&address); - ipv4_address->sin_family = AF_INET; - ipv4_address->sin_port = 0; - memcpy(&ipv4_address->sin_addr, src, sizeof(in4_addr_type)); + address.v4.sin_family = AF_INET; + address.v4.sin_port = 0; + memcpy(&address.v4.sin_addr, src, sizeof(in4_addr_type)); } else // AF_INET6 { address_length = sizeof(sockaddr_in6_type); - sockaddr_in6_type* ipv6_address = - reinterpret_cast(&address); - ipv6_address->sin6_family = AF_INET6; - ipv6_address->sin6_port = 0; - ipv6_address->sin6_flowinfo = 0; - ipv6_address->sin6_scope_id = scope_id; - memcpy(&ipv6_address->sin6_addr, src, sizeof(in6_addr_type)); + address.v6.sin6_family = AF_INET6; + address.v6.sin6_port = 0; + address.v6.sin6_flowinfo = 0; + address.v6.sin6_scope_id = scope_id; + memcpy(&address.v6.sin6_addr, src, sizeof(in6_addr_type)); } DWORD string_length = static_cast(length); #if defined(BOOST_NO_ANSI_APIS) LPWSTR string_buffer = (LPWSTR)_alloca(length * sizeof(WCHAR)); - int result = error_wrapper(::WSAAddressToStringW( - reinterpret_cast(&address), + int result = error_wrapper(::WSAAddressToStringW(&address.base, address_length, 0, string_buffer, &string_length), ec); ::WideCharToMultiByte(CP_ACP, 0, string_buffer, -1, dest, length, 0, 0); #else int result = error_wrapper(::WSAAddressToStringA( - reinterpret_cast(&address), - address_length, 0, dest, &string_length), ec); + &address.base, address_length, 0, dest, &string_length), ec); #endif // Windows may set error code on success. @@ -774,30 +774,30 @@ inline int inet_pton(int af, const char* src, void* dest, return -1; } - sockaddr_storage_type address; + union + { + socket_addr_type base; + sockaddr_storage_type storage; + sockaddr_in4_type v4; + sockaddr_in6_type v6; + } address; int address_length = sizeof(sockaddr_storage_type); #if defined(BOOST_NO_ANSI_APIS) int num_wide_chars = strlen(src) + 1; LPWSTR wide_buffer = (LPWSTR)_alloca(num_wide_chars * sizeof(WCHAR)); ::MultiByteToWideChar(CP_ACP, 0, src, -1, wide_buffer, num_wide_chars); int result = error_wrapper(::WSAStringToAddressW( - wide_buffer, af, 0, - reinterpret_cast(&address), - &address_length), ec); + wide_buffer, af, 0, &address.base, &address_length), ec); #else int result = error_wrapper(::WSAStringToAddressA( - const_cast(src), af, 0, - reinterpret_cast(&address), - &address_length), ec); + const_cast(src), af, 0, &address.base, &address_length), ec); #endif if (af == AF_INET) { if (result != socket_error_retval) { - sockaddr_in4_type* ipv4_address = - reinterpret_cast(&address); - memcpy(dest, &ipv4_address->sin_addr, sizeof(in4_addr_type)); + memcpy(dest, &address.v4.sin_addr, sizeof(in4_addr_type)); clear_error(ec); } else if (strcmp(src, "255.255.255.255") == 0) @@ -810,11 +810,9 @@ inline int inet_pton(int af, const char* src, void* dest, { if (result != socket_error_retval) { - sockaddr_in6_type* ipv6_address = - reinterpret_cast(&address); - memcpy(dest, &ipv6_address->sin6_addr, sizeof(in6_addr_type)); + memcpy(dest, &address.v6.sin6_addr, sizeof(in6_addr_type)); if (scope_id) - *scope_id = ipv6_address->sin6_scope_id; + *scope_id = address.v6.sin6_scope_id; clear_error(ec); } } diff --git a/libtorrent/include/libtorrent/asio/detail/socket_option.hpp b/libtorrent/include/libtorrent/asio/detail/socket_option.hpp index 1a03936ab..27c898a49 100644 --- a/libtorrent/include/libtorrent/asio/detail/socket_option.hpp +++ b/libtorrent/include/libtorrent/asio/detail/socket_option.hpp @@ -2,7 +2,7 @@ // socket_option.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/socket_select_interrupter.hpp b/libtorrent/include/libtorrent/asio/detail/socket_select_interrupter.hpp index 988f92e8e..f978f7c67 100644 --- a/libtorrent/include/libtorrent/asio/detail/socket_select_interrupter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/socket_select_interrupter.hpp @@ -2,7 +2,7 @@ // socket_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/socket_types.hpp b/libtorrent/include/libtorrent/asio/detail/socket_types.hpp index d1497a345..b1e6e6781 100644 --- a/libtorrent/include/libtorrent/asio/detail/socket_types.hpp +++ b/libtorrent/include/libtorrent/asio/detail/socket_types.hpp @@ -2,7 +2,7 @@ // socket_types.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/strand_service.hpp b/libtorrent/include/libtorrent/asio/detail/strand_service.hpp index 598b79dcc..42a5752f9 100644 --- a/libtorrent/include/libtorrent/asio/detail/strand_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/strand_service.hpp @@ -2,7 +2,7 @@ // strand_service.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -427,10 +427,9 @@ public: if (impl->current_handler_ == 0) { // This handler now has the lock, so can be dispatched immediately. - impl->current_handler_ = ptr.get(); + impl->current_handler_ = ptr.release(); lock.unlock(); this->get_io_service().dispatch(invoke_current_handler(*this, impl)); - ptr.release(); } else { @@ -467,10 +466,9 @@ public: if (impl->current_handler_ == 0) { // This handler now has the lock, so can be dispatched immediately. - impl->current_handler_ = ptr.get(); + impl->current_handler_ = ptr.release(); lock.unlock(); this->get_io_service().post(invoke_current_handler(*this, impl)); - ptr.release(); } else { diff --git a/libtorrent/include/libtorrent/asio/detail/task_io_service.hpp b/libtorrent/include/libtorrent/asio/detail/task_io_service.hpp index ffadb620b..6889845ca 100644 --- a/libtorrent/include/libtorrent/asio/detail/task_io_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/task_io_service.hpp @@ -2,7 +2,7 @@ // task_io_service.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/task_io_service_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/task_io_service_fwd.hpp index 208a9d3ca..02ccdc21e 100644 --- a/libtorrent/include/libtorrent/asio/detail/task_io_service_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/task_io_service_fwd.hpp @@ -2,7 +2,7 @@ // task_io_service_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/thread.hpp b/libtorrent/include/libtorrent/asio/detail/thread.hpp index 520477e37..66b701ca5 100644 --- a/libtorrent/include/libtorrent/asio/detail/thread.hpp +++ b/libtorrent/include/libtorrent/asio/detail/thread.hpp @@ -2,7 +2,7 @@ // thread.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/throw_error.hpp b/libtorrent/include/libtorrent/asio/detail/throw_error.hpp index d2ad09a2e..bf2356c0a 100644 --- a/libtorrent/include/libtorrent/asio/detail/throw_error.hpp +++ b/libtorrent/include/libtorrent/asio/detail/throw_error.hpp @@ -2,7 +2,7 @@ // throw_error.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/timer_queue.hpp b/libtorrent/include/libtorrent/asio/detail/timer_queue.hpp index 472cc3759..ed12ddaa9 100644 --- a/libtorrent/include/libtorrent/asio/detail/timer_queue.hpp +++ b/libtorrent/include/libtorrent/asio/detail/timer_queue.hpp @@ -2,7 +2,7 @@ // timer_queue.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/timer_queue_base.hpp b/libtorrent/include/libtorrent/asio/detail/timer_queue_base.hpp index 6cf25747a..30a2a216e 100644 --- a/libtorrent/include/libtorrent/asio/detail/timer_queue_base.hpp +++ b/libtorrent/include/libtorrent/asio/detail/timer_queue_base.hpp @@ -2,7 +2,7 @@ // timer_queue_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/tss_ptr.hpp b/libtorrent/include/libtorrent/asio/detail/tss_ptr.hpp index 8a860a68f..5e5f8a01e 100644 --- a/libtorrent/include/libtorrent/asio/detail/tss_ptr.hpp +++ b/libtorrent/include/libtorrent/asio/detail/tss_ptr.hpp @@ -2,7 +2,7 @@ // tss_ptr.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_event.hpp b/libtorrent/include/libtorrent/asio/detail/win_event.hpp index ff97fbedc..2f057cdd7 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_event.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_event.hpp @@ -2,7 +2,7 @@ // win_event.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_fd_set_adapter.hpp b/libtorrent/include/libtorrent/asio/detail/win_fd_set_adapter.hpp index c97063a53..ea5254294 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_fd_set_adapter.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // win_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service.hpp b/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service.hpp index fe2e58a0e..6dec9c9b4 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service.hpp @@ -2,7 +2,7 @@ // win_iocp_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -392,7 +392,7 @@ private: &timer_thread_, this_thread_id, 0) == 0); // Calculate timeout for GetQueuedCompletionStatus call. - DWORD timeout = INFINITE; + DWORD timeout = max_timeout; if (dispatching_timers) { asio::detail::mutex::scoped_lock lock(timer_mutex_); @@ -420,11 +420,11 @@ private: { asio::detail::mutex::scoped_lock lock(timer_mutex_); timer_queues_copy_ = timer_queues_; - for (std::size_t i = 0; i < timer_queues_.size(); ++i) + for (std::size_t i = 0; i < timer_queues_copy_.size(); ++i) { - timer_queues_[i]->dispatch_timers(); - timer_queues_[i]->dispatch_cancellations(); - timer_queues_[i]->cleanup_timers(); + timer_queues_copy_[i]->dispatch_timers(); + timer_queues_copy_[i]->dispatch_cancellations(); + timer_queues_copy_[i]->cleanup_timers(); } } catch (...) diff --git a/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service_fwd.hpp b/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service_fwd.hpp index b3d1dec34..a40c6a871 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service_fwd.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_iocp_io_service_fwd.hpp @@ -2,7 +2,7 @@ // win_iocp_io_service_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_iocp_socket_service.hpp b/libtorrent/include/libtorrent/asio/detail/win_iocp_socket_service.hpp index faf6a5c1e..770ca4899 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_iocp_socket_service.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_iocp_socket_service.hpp @@ -2,7 +2,7 @@ // win_iocp_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -155,11 +155,13 @@ public: // The protocol associated with the socket. protocol_type protocol_; +#if defined(ASIO_ENABLE_CANCELIO) // The ID of the thread from which it is safe to cancel asynchronous // operations. 0 means no asynchronous operations have been started yet. // ~0 means asynchronous operations have been started from more than one // thread, and cancellation is not supported for the socket. DWORD safe_cancellation_thread_id_; +#endif // defined(ASIO_ENABLE_CANCELIO) // Pointers to adjacent socket implementations in linked list. implementation_type* next_; @@ -203,7 +205,9 @@ public: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(ASIO_ENABLE_CANCELIO) // Insert implementation into linked list of all implementations. asio::detail::mutex::scoped_lock lock(mutex_); @@ -305,7 +309,9 @@ public: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(ASIO_ENABLE_CANCELIO) } ec = asio::error_code(); @@ -337,14 +343,25 @@ public: if (!cancel_io_ex(sock_as_handle, 0)) { DWORD last_error = ::GetLastError(); - ec = asio::error_code(last_error, - asio::error::get_system_category()); + if (last_error == ERROR_NOT_FOUND) + { + // ERROR_NOT_FOUND means that there were no operations to be + // cancelled. We swallow this error to match the behaviour on other + // platforms. + ec = asio::error_code(); + } + else + { + ec = asio::error_code(last_error, + asio::error::get_system_category()); + } } else { ec = asio::error_code(); } } +#if defined(ASIO_ENABLE_CANCELIO) else if (impl.safe_cancellation_thread_id_ == 0) { // No operations have been started, so there's nothing to cancel. @@ -373,6 +390,13 @@ public: // so cancellation is not safe. ec = asio::error::operation_not_supported; } +#else // defined(ASIO_ENABLE_CANCELIO) + else + { + // Cancellation is not supported as CancelIo may not be used. + ec = asio::error::operation_not_supported; + } +#endif // defined(ASIO_ENABLE_CANCELIO) return ec; } @@ -772,11 +796,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef send_operation value_type; @@ -963,11 +989,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef send_to_operation value_type; @@ -1174,11 +1202,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef receive_operation value_type; @@ -1394,11 +1424,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Allocate and construct an operation to wrap the handler. typedef receive_from_operation value_type; @@ -1718,11 +1750,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Create a new socket for the connection. asio::error_code ec; @@ -1892,11 +1926,13 @@ public: return; } +#if defined(ASIO_ENABLE_CANCELIO) // Update the ID of the thread from which cancellation is safe. if (impl.safe_cancellation_thread_id_ == 0) impl.safe_cancellation_thread_id_ = ::GetCurrentThreadId(); else if (impl.safe_cancellation_thread_id_ != ::GetCurrentThreadId()) impl.safe_cancellation_thread_id_ = ~DWORD(0); +#endif // defined(ASIO_ENABLE_CANCELIO) // Check if the reactor was already obtained from the io_service. reactor_type* reactor = static_cast( @@ -1996,7 +2032,9 @@ private: impl.socket_ = invalid_socket; impl.flags_ = 0; impl.cancel_token_.reset(); +#if defined(ASIO_ENABLE_CANCELIO) impl.safe_cancellation_thread_id_ = 0; +#endif // defined(ASIO_ENABLE_CANCELIO) } } diff --git a/libtorrent/include/libtorrent/asio/detail/win_mutex.hpp b/libtorrent/include/libtorrent/asio/detail/win_mutex.hpp index f937db69f..4fdb5973b 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_mutex.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_mutex.hpp @@ -2,7 +2,7 @@ // win_mutex.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_signal_blocker.hpp b/libtorrent/include/libtorrent/asio/detail/win_signal_blocker.hpp index 892c40f89..5c3c9f4d2 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_signal_blocker.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_signal_blocker.hpp @@ -2,7 +2,7 @@ // win_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_thread.hpp b/libtorrent/include/libtorrent/asio/detail/win_thread.hpp index 4a80d15a3..acd8b51e3 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_thread.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_thread.hpp @@ -2,7 +2,7 @@ // win_thread.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/win_tss_ptr.hpp b/libtorrent/include/libtorrent/asio/detail/win_tss_ptr.hpp index 8f6eaf6cb..40b411543 100644 --- a/libtorrent/include/libtorrent/asio/detail/win_tss_ptr.hpp +++ b/libtorrent/include/libtorrent/asio/detail/win_tss_ptr.hpp @@ -2,7 +2,7 @@ // win_tss_ptr.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/wince_thread.hpp b/libtorrent/include/libtorrent/asio/detail/wince_thread.hpp index f65a36f0c..d0b4a9f51 100644 --- a/libtorrent/include/libtorrent/asio/detail/wince_thread.hpp +++ b/libtorrent/include/libtorrent/asio/detail/wince_thread.hpp @@ -2,7 +2,7 @@ // wince_thread.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/winsock_init.hpp b/libtorrent/include/libtorrent/asio/detail/winsock_init.hpp index 65efb8852..f5ca1a9df 100644 --- a/libtorrent/include/libtorrent/asio/detail/winsock_init.hpp +++ b/libtorrent/include/libtorrent/asio/detail/winsock_init.hpp @@ -2,7 +2,7 @@ // winsock_init.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/detail/wrapped_handler.hpp b/libtorrent/include/libtorrent/asio/detail/wrapped_handler.hpp index 913a795dc..0d8d03590 100644 --- a/libtorrent/include/libtorrent/asio/detail/wrapped_handler.hpp +++ b/libtorrent/include/libtorrent/asio/detail/wrapped_handler.hpp @@ -2,7 +2,7 @@ // wrapped_handler.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/error.hpp b/libtorrent/include/libtorrent/asio/error.hpp index 1c1946af6..1487ed3d7 100644 --- a/libtorrent/include/libtorrent/asio/error.hpp +++ b/libtorrent/include/libtorrent/asio/error.hpp @@ -2,7 +2,7 @@ // error.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/error_code.hpp b/libtorrent/include/libtorrent/asio/error_code.hpp index 6c8370d42..9e67fca82 100644 --- a/libtorrent/include/libtorrent/asio/error_code.hpp +++ b/libtorrent/include/libtorrent/asio/error_code.hpp @@ -2,7 +2,7 @@ // error_code.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/handler_alloc_hook.hpp b/libtorrent/include/libtorrent/asio/handler_alloc_hook.hpp index 042b1fecd..f49a78da9 100644 --- a/libtorrent/include/libtorrent/asio/handler_alloc_hook.hpp +++ b/libtorrent/include/libtorrent/asio/handler_alloc_hook.hpp @@ -2,7 +2,7 @@ // handler_alloc_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/handler_invoke_hook.hpp b/libtorrent/include/libtorrent/asio/handler_invoke_hook.hpp index 4ba5db329..0c6587ded 100644 --- a/libtorrent/include/libtorrent/asio/handler_invoke_hook.hpp +++ b/libtorrent/include/libtorrent/asio/handler_invoke_hook.hpp @@ -2,7 +2,7 @@ // handler_invoke_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/impl/error_code.ipp b/libtorrent/include/libtorrent/asio/impl/error_code.ipp index 52aef2851..fa0520a9f 100644 --- a/libtorrent/include/libtorrent/asio/impl/error_code.ipp +++ b/libtorrent/include/libtorrent/asio/impl/error_code.ipp @@ -2,7 +2,7 @@ // error_code.ipp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/impl/io_service.ipp b/libtorrent/include/libtorrent/asio/impl/io_service.ipp index 8ebc2643c..e548055fa 100644 --- a/libtorrent/include/libtorrent/asio/impl/io_service.ipp +++ b/libtorrent/include/libtorrent/asio/impl/io_service.ipp @@ -2,7 +2,7 @@ // io_service.ipp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/impl/read.ipp b/libtorrent/include/libtorrent/asio/impl/read.ipp index f30f50fb0..b3d573905 100644 --- a/libtorrent/include/libtorrent/asio/impl/read.ipp +++ b/libtorrent/include/libtorrent/asio/impl/read.ipp @@ -2,7 +2,7 @@ // read.ipp // ~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/impl/read_until.ipp b/libtorrent/include/libtorrent/asio/impl/read_until.ipp index 8b69a11c6..fa549fe88 100644 --- a/libtorrent/include/libtorrent/asio/impl/read_until.ipp +++ b/libtorrent/include/libtorrent/asio/impl/read_until.ipp @@ -2,7 +2,7 @@ // read_until.ipp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/impl/write.ipp b/libtorrent/include/libtorrent/asio/impl/write.ipp index 8c2d1d33f..43bc2972a 100644 --- a/libtorrent/include/libtorrent/asio/impl/write.ipp +++ b/libtorrent/include/libtorrent/asio/impl/write.ipp @@ -2,7 +2,7 @@ // write.ipp // ~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/io_service.hpp b/libtorrent/include/libtorrent/asio/io_service.hpp index 984a63e18..451b65a33 100644 --- a/libtorrent/include/libtorrent/asio/io_service.hpp +++ b/libtorrent/include/libtorrent/asio/io_service.hpp @@ -2,7 +2,7 @@ // io_service.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/address.hpp b/libtorrent/include/libtorrent/asio/ip/address.hpp index 1b2c548bf..a96fcc5e7 100644 --- a/libtorrent/include/libtorrent/asio/ip/address.hpp +++ b/libtorrent/include/libtorrent/asio/ip/address.hpp @@ -2,7 +2,7 @@ // address.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/address_v4.hpp b/libtorrent/include/libtorrent/asio/ip/address_v4.hpp index c7de56b7e..cda2a11c0 100644 --- a/libtorrent/include/libtorrent/asio/ip/address_v4.hpp +++ b/libtorrent/include/libtorrent/asio/ip/address_v4.hpp @@ -2,7 +2,7 @@ // address_v4.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/address_v6.hpp b/libtorrent/include/libtorrent/asio/ip/address_v6.hpp index ce5eeb00b..c317fe487 100644 --- a/libtorrent/include/libtorrent/asio/ip/address_v6.hpp +++ b/libtorrent/include/libtorrent/asio/ip/address_v6.hpp @@ -2,7 +2,7 @@ // address_v6.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/basic_endpoint.hpp b/libtorrent/include/libtorrent/asio/ip/basic_endpoint.hpp index 643df48a7..c83228539 100644 --- a/libtorrent/include/libtorrent/asio/ip/basic_endpoint.hpp +++ b/libtorrent/include/libtorrent/asio/ip/basic_endpoint.hpp @@ -2,7 +2,7 @@ // basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -65,11 +65,9 @@ public: basic_endpoint() : data_() { - asio::detail::sockaddr_in4_type& data - = reinterpret_cast(data_); - data.sin_family = AF_INET; - data.sin_port = 0; - data.sin_addr.s_addr = INADDR_ANY; + data_.v4.sin_family = AF_INET; + data_.v4.sin_port = 0; + data_.v4.sin_addr.s_addr = INADDR_ANY; } /// Construct an endpoint using a port number, specified in the host's byte @@ -94,24 +92,20 @@ public: using namespace std; // For memcpy. if (protocol.family() == PF_INET) { - asio::detail::sockaddr_in4_type& data - = reinterpret_cast(data_); - data.sin_family = AF_INET; - data.sin_port = + data_.v4.sin_family = AF_INET; + data_.v4.sin_port = asio::detail::socket_ops::host_to_network_short(port_num); - data.sin_addr.s_addr = INADDR_ANY; + data_.v4.sin_addr.s_addr = INADDR_ANY; } else { - asio::detail::sockaddr_in6_type& data - = reinterpret_cast(data_); - data.sin6_family = AF_INET6; - data.sin6_port = + data_.v6.sin6_family = AF_INET6; + data_.v6.sin6_port = asio::detail::socket_ops::host_to_network_short(port_num); - data.sin6_flowinfo = 0; + data_.v6.sin6_flowinfo = 0; asio::detail::in6_addr_type tmp_addr = IN6ADDR_ANY_INIT; - data.sin6_addr = tmp_addr; - data.sin6_scope_id = 0; + data_.v6.sin6_addr = tmp_addr; + data_.v6.sin6_scope_id = 0; } } @@ -124,27 +118,23 @@ public: using namespace std; // For memcpy. if (addr.is_v4()) { - asio::detail::sockaddr_in4_type& data - = reinterpret_cast(data_); - data.sin_family = AF_INET; - data.sin_port = + data_.v4.sin_family = AF_INET; + data_.v4.sin_port = asio::detail::socket_ops::host_to_network_short(port_num); - data.sin_addr.s_addr = + data_.v4.sin_addr.s_addr = asio::detail::socket_ops::host_to_network_long( addr.to_v4().to_ulong()); } else { - asio::detail::sockaddr_in6_type& data - = reinterpret_cast(data_); - data.sin6_family = AF_INET6; - data.sin6_port = + data_.v6.sin6_family = AF_INET6; + data_.v6.sin6_port = asio::detail::socket_ops::host_to_network_short(port_num); - data.sin6_flowinfo = 0; + data_.v6.sin6_flowinfo = 0; asio::ip::address_v6 v6_addr = addr.to_v6(); asio::ip::address_v6::bytes_type bytes = v6_addr.to_bytes(); - memcpy(data.sin6_addr.s6_addr, bytes.elems, 16); - data.sin6_scope_id = v6_addr.scope_id(); + memcpy(data_.v6.sin6_addr.s6_addr, bytes.elems, 16); + data_.v6.sin6_scope_id = v6_addr.scope_id(); } } @@ -164,7 +154,7 @@ public: /// The protocol associated with the endpoint. protocol_type protocol() const { - if (is_v4(data_)) + if (is_v4()) return InternetProtocol::v4(); return InternetProtocol::v6(); } @@ -172,19 +162,19 @@ public: /// Get the underlying endpoint in the native type. data_type* data() { - return reinterpret_cast(&data_); + return &data_.base; } /// Get the underlying endpoint in the native type. const data_type* data() const { - return reinterpret_cast(&data_); + return &data_.base; } /// Get the underlying size of the endpoint in the native type. std::size_t size() const { - if (is_v4(data_)) + if (is_v4()) return sizeof(asio::detail::sockaddr_in4_type); else return sizeof(asio::detail::sockaddr_in6_type); @@ -193,7 +183,7 @@ public: /// Set the underlying size of the endpoint in the native type. void resize(std::size_t size) { - if (size > sizeof(data_)) + if (size > sizeof(asio::detail::sockaddr_storage_type)) { asio::system_error e(asio::error::invalid_argument); boost::throw_exception(e); @@ -203,24 +193,22 @@ public: /// Get the capacity of the endpoint in the native type. std::size_t capacity() const { - return sizeof(data_); + return sizeof(asio::detail::sockaddr_storage_type); } /// Get the port associated with the endpoint. The port number is always in /// the host's byte order. unsigned short port() const { - if (is_v4(data_)) + if (is_v4()) { return asio::detail::socket_ops::network_to_host_short( - reinterpret_cast( - data_).sin_port); + data_.v4.sin_port); } else { return asio::detail::socket_ops::network_to_host_short( - reinterpret_cast( - data_).sin6_port); + data_.v6.sin6_port); } } @@ -228,14 +216,14 @@ public: /// the host's byte order. void port(unsigned short port_num) { - if (is_v4(data_)) + if (is_v4()) { - reinterpret_cast(data_).sin_port + data_.v4.sin_port = asio::detail::socket_ops::host_to_network_short(port_num); } else { - reinterpret_cast(data_).sin6_port + data_.v6.sin6_port = asio::detail::socket_ops::host_to_network_short(port_num); } } @@ -244,23 +232,17 @@ public: asio::ip::address address() const { using namespace std; // For memcpy. - if (is_v4(data_)) + if (is_v4()) { - const asio::detail::sockaddr_in4_type& data - = reinterpret_cast( - data_); return asio::ip::address_v4( asio::detail::socket_ops::network_to_host_long( - data.sin_addr.s_addr)); + data_.v4.sin_addr.s_addr)); } else { - const asio::detail::sockaddr_in6_type& data - = reinterpret_cast( - data_); asio::ip::address_v6::bytes_type bytes; - memcpy(bytes.elems, data.sin6_addr.s6_addr, 16); - return asio::ip::address_v6(bytes, data.sin6_scope_id); + memcpy(bytes.elems, data_.v6.sin6_addr.s6_addr, 16); + return asio::ip::address_v6(bytes, data_.v6.sin6_scope_id); } } @@ -298,29 +280,19 @@ public: private: // Helper function to determine whether the endpoint is IPv4. -#if defined(_AIX) - template struct is_v4_helper {}; - - template - static bool is_v4(const T& ss, is_v4_helper* = 0) + bool is_v4() const { - return ss.ss_family == AF_INET; + return data_.base.sa_family == AF_INET; } - template - static bool is_v4(const T& ss, is_v4_helper* = 0) - { - return ss.__ss_family == AF_INET; - } -#else - static bool is_v4(const asio::detail::sockaddr_storage_type& ss) - { - return ss.ss_family == AF_INET; - } -#endif - // The underlying IP socket address. - asio::detail::sockaddr_storage_type data_; + union data_union + { + asio::detail::socket_addr_type base; + asio::detail::sockaddr_storage_type storage; + asio::detail::sockaddr_in4_type v4; + asio::detail::sockaddr_in6_type v6; + } data_; }; /// Output an endpoint as a string. diff --git a/libtorrent/include/libtorrent/asio/ip/basic_resolver.hpp b/libtorrent/include/libtorrent/asio/ip/basic_resolver.hpp index 8c9d25486..d5593778d 100644 --- a/libtorrent/include/libtorrent/asio/ip/basic_resolver.hpp +++ b/libtorrent/include/libtorrent/asio/ip/basic_resolver.hpp @@ -2,7 +2,7 @@ // basic_resolver.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/basic_resolver_entry.hpp b/libtorrent/include/libtorrent/asio/ip/basic_resolver_entry.hpp index 03184d8f5..b29f9573b 100644 --- a/libtorrent/include/libtorrent/asio/ip/basic_resolver_entry.hpp +++ b/libtorrent/include/libtorrent/asio/ip/basic_resolver_entry.hpp @@ -2,7 +2,7 @@ // basic_resolver_entry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/basic_resolver_iterator.hpp b/libtorrent/include/libtorrent/asio/ip/basic_resolver_iterator.hpp index 81c652ce8..fe04ffcae 100644 --- a/libtorrent/include/libtorrent/asio/ip/basic_resolver_iterator.hpp +++ b/libtorrent/include/libtorrent/asio/ip/basic_resolver_iterator.hpp @@ -2,7 +2,7 @@ // basic_resolver_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/basic_resolver_query.hpp b/libtorrent/include/libtorrent/asio/ip/basic_resolver_query.hpp index 0fdd003fe..bf43a44e7 100644 --- a/libtorrent/include/libtorrent/asio/ip/basic_resolver_query.hpp +++ b/libtorrent/include/libtorrent/asio/ip/basic_resolver_query.hpp @@ -2,7 +2,7 @@ // basic_resolver_query.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/detail/socket_option.hpp b/libtorrent/include/libtorrent/asio/ip/detail/socket_option.hpp index 1d43d6059..a3496fd56 100644 --- a/libtorrent/include/libtorrent/asio/ip/detail/socket_option.hpp +++ b/libtorrent/include/libtorrent/asio/ip/detail/socket_option.hpp @@ -2,7 +2,7 @@ // socket_option.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/host_name.hpp b/libtorrent/include/libtorrent/asio/ip/host_name.hpp index 15adc08cc..852801397 100644 --- a/libtorrent/include/libtorrent/asio/ip/host_name.hpp +++ b/libtorrent/include/libtorrent/asio/ip/host_name.hpp @@ -2,7 +2,7 @@ // host_name.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/multicast.hpp b/libtorrent/include/libtorrent/asio/ip/multicast.hpp index 8b48687f1..c8b84f5d3 100644 --- a/libtorrent/include/libtorrent/asio/ip/multicast.hpp +++ b/libtorrent/include/libtorrent/asio/ip/multicast.hpp @@ -2,7 +2,7 @@ // multicast.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/resolver_query_base.hpp b/libtorrent/include/libtorrent/asio/ip/resolver_query_base.hpp index 5b76fb3c2..16f846642 100644 --- a/libtorrent/include/libtorrent/asio/ip/resolver_query_base.hpp +++ b/libtorrent/include/libtorrent/asio/ip/resolver_query_base.hpp @@ -2,7 +2,7 @@ // resolver_query_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/resolver_service.hpp b/libtorrent/include/libtorrent/asio/ip/resolver_service.hpp index 6d5193ea8..01b0a8e3e 100644 --- a/libtorrent/include/libtorrent/asio/ip/resolver_service.hpp +++ b/libtorrent/include/libtorrent/asio/ip/resolver_service.hpp @@ -2,7 +2,7 @@ // resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/tcp.hpp b/libtorrent/include/libtorrent/asio/ip/tcp.hpp index e31844c4d..2dd229298 100644 --- a/libtorrent/include/libtorrent/asio/ip/tcp.hpp +++ b/libtorrent/include/libtorrent/asio/ip/tcp.hpp @@ -2,7 +2,7 @@ // tcp.hpp // ~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/udp.hpp b/libtorrent/include/libtorrent/asio/ip/udp.hpp index e434f74d9..47d6e41b1 100644 --- a/libtorrent/include/libtorrent/asio/ip/udp.hpp +++ b/libtorrent/include/libtorrent/asio/ip/udp.hpp @@ -2,7 +2,7 @@ // udp.hpp // ~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/unicast.hpp b/libtorrent/include/libtorrent/asio/ip/unicast.hpp index ef065f298..dd0707d18 100644 --- a/libtorrent/include/libtorrent/asio/ip/unicast.hpp +++ b/libtorrent/include/libtorrent/asio/ip/unicast.hpp @@ -2,7 +2,7 @@ // unicast.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ip/v6_only.hpp b/libtorrent/include/libtorrent/asio/ip/v6_only.hpp index 8c3708139..d730fc77c 100644 --- a/libtorrent/include/libtorrent/asio/ip/v6_only.hpp +++ b/libtorrent/include/libtorrent/asio/ip/v6_only.hpp @@ -2,7 +2,7 @@ // v6_only.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/is_read_buffered.hpp b/libtorrent/include/libtorrent/asio/is_read_buffered.hpp index 091ba8c5f..53b8f34d1 100644 --- a/libtorrent/include/libtorrent/asio/is_read_buffered.hpp +++ b/libtorrent/include/libtorrent/asio/is_read_buffered.hpp @@ -2,7 +2,7 @@ // is_read_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/is_write_buffered.hpp b/libtorrent/include/libtorrent/asio/is_write_buffered.hpp index 946f7468c..423155415 100644 --- a/libtorrent/include/libtorrent/asio/is_write_buffered.hpp +++ b/libtorrent/include/libtorrent/asio/is_write_buffered.hpp @@ -2,7 +2,7 @@ // is_write_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/placeholders.hpp b/libtorrent/include/libtorrent/asio/placeholders.hpp index 9309fc0b4..bf93c7df1 100644 --- a/libtorrent/include/libtorrent/asio/placeholders.hpp +++ b/libtorrent/include/libtorrent/asio/placeholders.hpp @@ -2,7 +2,7 @@ // placeholders.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/read.hpp b/libtorrent/include/libtorrent/asio/read.hpp index 6e9772dee..46bca2622 100644 --- a/libtorrent/include/libtorrent/asio/read.hpp +++ b/libtorrent/include/libtorrent/asio/read.hpp @@ -2,7 +2,7 @@ // read.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/read_until.hpp b/libtorrent/include/libtorrent/asio/read_until.hpp index 6917ec6b8..8c7e3d379 100644 --- a/libtorrent/include/libtorrent/asio/read_until.hpp +++ b/libtorrent/include/libtorrent/asio/read_until.hpp @@ -2,7 +2,7 @@ // read_until.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/socket_acceptor_service.hpp b/libtorrent/include/libtorrent/asio/socket_acceptor_service.hpp index e80f8c1ca..48a6df256 100644 --- a/libtorrent/include/libtorrent/asio/socket_acceptor_service.hpp +++ b/libtorrent/include/libtorrent/asio/socket_acceptor_service.hpp @@ -2,7 +2,7 @@ // socket_acceptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/socket_base.hpp b/libtorrent/include/libtorrent/asio/socket_base.hpp index 1239989a9..67fe6887d 100644 --- a/libtorrent/include/libtorrent/asio/socket_base.hpp +++ b/libtorrent/include/libtorrent/asio/socket_base.hpp @@ -2,7 +2,7 @@ // socket_base.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl.hpp b/libtorrent/include/libtorrent/asio/ssl.hpp index 3f2d2750c..c66113704 100644 --- a/libtorrent/include/libtorrent/asio/ssl.hpp +++ b/libtorrent/include/libtorrent/asio/ssl.hpp @@ -2,7 +2,7 @@ // ssl.hpp // ~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/basic_context.hpp b/libtorrent/include/libtorrent/asio/ssl/basic_context.hpp index b85a01c1d..c1346e6e5 100755 --- a/libtorrent/include/libtorrent/asio/ssl/basic_context.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/basic_context.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/context.hpp b/libtorrent/include/libtorrent/asio/ssl/context.hpp index 86e249cbc..7c29e017a 100644 --- a/libtorrent/include/libtorrent/asio/ssl/context.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/context.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/context_base.hpp b/libtorrent/include/libtorrent/asio/ssl/context_base.hpp index 0811d8ba5..cc8a2a5df 100755 --- a/libtorrent/include/libtorrent/asio/ssl/context_base.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/context_base.hpp @@ -2,7 +2,7 @@ // context_base.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/context_service.hpp b/libtorrent/include/libtorrent/asio/ssl/context_service.hpp index f0698a58f..0bdaf75d4 100755 --- a/libtorrent/include/libtorrent/asio/ssl/context_service.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/context_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_context_service.hpp b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_context_service.hpp index 96d610801..5a90d5a2f 100755 --- a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_context_service.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_context_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_init.hpp b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_init.hpp index e646acf48..07d7e6674 100755 --- a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_init.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_init.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_stream_service.hpp b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_stream_service.hpp index ea0339326..710c935cf 100644 --- a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_stream_service.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_stream_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_types.hpp b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_types.hpp index d193b3a0c..1111361e2 100755 --- a/libtorrent/include/libtorrent/asio/ssl/detail/openssl_types.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/detail/openssl_types.hpp @@ -2,7 +2,7 @@ // openssl_types.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,8 @@ #include "asio/detail/push_options.hpp" +#include "asio/detail/socket_types.hpp" + #include "asio/detail/push_options.hpp" #include #include diff --git a/libtorrent/include/libtorrent/asio/ssl/stream.hpp b/libtorrent/include/libtorrent/asio/ssl/stream.hpp index e22f6b06c..77ced5bfe 100644 --- a/libtorrent/include/libtorrent/asio/ssl/stream.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/stream.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/stream_base.hpp b/libtorrent/include/libtorrent/asio/ssl/stream_base.hpp index 89c4b65a9..70ffbb269 100755 --- a/libtorrent/include/libtorrent/asio/ssl/stream_base.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/stream_base.hpp @@ -2,7 +2,7 @@ // stream_base.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/ssl/stream_service.hpp b/libtorrent/include/libtorrent/asio/ssl/stream_service.hpp index d96e68aec..3465605f9 100644 --- a/libtorrent/include/libtorrent/asio/ssl/stream_service.hpp +++ b/libtorrent/include/libtorrent/asio/ssl/stream_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/strand.hpp b/libtorrent/include/libtorrent/asio/strand.hpp index ff76415a2..065a9d9ad 100644 --- a/libtorrent/include/libtorrent/asio/strand.hpp +++ b/libtorrent/include/libtorrent/asio/strand.hpp @@ -2,7 +2,7 @@ // strand.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/stream_socket_service.hpp b/libtorrent/include/libtorrent/asio/stream_socket_service.hpp index 7a04c6bf0..510d8cf6d 100644 --- a/libtorrent/include/libtorrent/asio/stream_socket_service.hpp +++ b/libtorrent/include/libtorrent/asio/stream_socket_service.hpp @@ -2,7 +2,7 @@ // stream_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/streambuf.hpp b/libtorrent/include/libtorrent/asio/streambuf.hpp index fdcc94a00..e81986776 100644 --- a/libtorrent/include/libtorrent/asio/streambuf.hpp +++ b/libtorrent/include/libtorrent/asio/streambuf.hpp @@ -2,7 +2,7 @@ // streambuf.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/system_error.hpp b/libtorrent/include/libtorrent/asio/system_error.hpp index 95f9f540e..397ffb2f2 100644 --- a/libtorrent/include/libtorrent/asio/system_error.hpp +++ b/libtorrent/include/libtorrent/asio/system_error.hpp @@ -2,7 +2,7 @@ // system_error.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/thread.hpp b/libtorrent/include/libtorrent/asio/thread.hpp index b8bc81bab..7cc8cdf0b 100644 --- a/libtorrent/include/libtorrent/asio/thread.hpp +++ b/libtorrent/include/libtorrent/asio/thread.hpp @@ -2,7 +2,7 @@ // thread.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/time_traits.hpp b/libtorrent/include/libtorrent/asio/time_traits.hpp index d3c910e53..18a30f25b 100644 --- a/libtorrent/include/libtorrent/asio/time_traits.hpp +++ b/libtorrent/include/libtorrent/asio/time_traits.hpp @@ -2,7 +2,7 @@ // time_traits.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/asio/version.hpp b/libtorrent/include/libtorrent/asio/version.hpp index f2d68f986..5da4fd99c 100644 --- a/libtorrent/include/libtorrent/asio/version.hpp +++ b/libtorrent/include/libtorrent/asio/version.hpp @@ -2,7 +2,7 @@ // version.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,6 @@ // ASIO_VERSION % 100 is the sub-minor version // ASIO_VERSION / 100 % 1000 is the minor version // ASIO_VERSION / 100000 is the major version -#define ASIO_VERSION 309 // 0.3.9 +#define ASIO_VERSION 100000 // 1.0.0 #endif // ASIO_VERSION_HPP diff --git a/libtorrent/include/libtorrent/asio/write.hpp b/libtorrent/include/libtorrent/asio/write.hpp index 5d643626a..1c72c1cd5 100644 --- a/libtorrent/include/libtorrent/asio/write.hpp +++ b/libtorrent/include/libtorrent/asio/write.hpp @@ -2,7 +2,7 @@ // write.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2007 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/libtorrent/include/libtorrent/bandwidth_manager.hpp b/libtorrent/include/libtorrent/bandwidth_manager.hpp index 148f68d43..0953cc320 100644 --- a/libtorrent/include/libtorrent/bandwidth_manager.hpp +++ b/libtorrent/include/libtorrent/bandwidth_manager.hpp @@ -158,7 +158,6 @@ struct bandwidth_manager INVARIANT_CHECK; if (m_abort) return; TORRENT_ASSERT(blk > 0); - TORRENT_ASSERT(!peer->ignore_bandwidth_limits()); // make sure this peer isn't already in line // waiting for bandwidth @@ -264,7 +263,7 @@ private: catch (std::exception&) {} } - void hand_out_bandwidth(boost::mutex::scoped_lock& l) throw() + void hand_out_bandwidth(boost::mutex::scoped_lock& l) { TORRENT_ASSERT(l.locked()); // if we're already handing out bandwidth, just return back @@ -380,7 +379,7 @@ private: } if (!tmp.empty()) m_queue.insert(m_queue.begin(), tmp.begin(), tmp.end()); } - catch (std::exception& e) + catch (std::exception&) { m_in_hand_out_bandwidth = false; throw; diff --git a/libtorrent/include/libtorrent/disk_io_thread.hpp b/libtorrent/include/libtorrent/disk_io_thread.hpp index 9db30a58c..4e0e95adf 100644 --- a/libtorrent/include/libtorrent/disk_io_thread.hpp +++ b/libtorrent/include/libtorrent/disk_io_thread.hpp @@ -74,7 +74,7 @@ namespace libtorrent action_t action; char* buffer; - size_type buffer_size; + int buffer_size; boost::intrusive_ptr storage; // arguments used for read and write int piece, offset; diff --git a/libtorrent/include/libtorrent/time.hpp b/libtorrent/include/libtorrent/time.hpp index ec1c0bce9..983e9fa4d 100644 --- a/libtorrent/include/libtorrent/time.hpp +++ b/libtorrent/include/libtorrent/time.hpp @@ -293,13 +293,13 @@ namespace libtorrent inline int total_seconds(time_duration td) { - return aux::performance_counter_to_microseconds(td.diff) - / 1000000; + return int(aux::performance_counter_to_microseconds(td.diff) + / 1000000); } inline int total_milliseconds(time_duration td) { - return aux::performance_counter_to_microseconds(td.diff) - / 1000; + return int(aux::performance_counter_to_microseconds(td.diff) + / 1000); } inline boost::int64_t total_microseconds(time_duration td) { diff --git a/libtorrent/include/libtorrent/torrent_handle.hpp b/libtorrent/include/libtorrent/torrent_handle.hpp index 14217d9a4..256209d49 100755 --- a/libtorrent/include/libtorrent/torrent_handle.hpp +++ b/libtorrent/include/libtorrent/torrent_handle.hpp @@ -281,7 +281,6 @@ namespace libtorrent torrent_handle(): m_ses(0), m_chk(0), m_info_hash(0) {} void get_peer_info(std::vector& v) const; - bool send_chat_message(tcp::endpoint ip, std::string message) const; torrent_status status() const; void get_download_queue(std::vector& queue) const; diff --git a/libtorrent/include/libtorrent/torrent_info.hpp b/libtorrent/include/libtorrent/torrent_info.hpp index a064936ff..1eab60902 100755 --- a/libtorrent/include/libtorrent/torrent_info.hpp +++ b/libtorrent/include/libtorrent/torrent_info.hpp @@ -198,7 +198,7 @@ namespace libtorrent const std::vector& trackers() const { return m_urls; } size_type total_size() const { TORRENT_ASSERT(m_piece_length > 0); return m_total_size; } - size_type piece_length() const { TORRENT_ASSERT(m_piece_length > 0); return m_piece_length; } + int piece_length() const { TORRENT_ASSERT(m_piece_length > 0); return m_piece_length; } int num_pieces() const { TORRENT_ASSERT(m_piece_length > 0); return m_num_pieces; } const sha1_hash& info_hash() const { return m_info_hash; } const std::string& name() const { TORRENT_ASSERT(m_piece_length > 0); return m_name; } @@ -215,7 +215,7 @@ namespace libtorrent void convert_file_names(); - size_type piece_size(int index) const; + int piece_size(int index) const; const sha1_hash& hash_for_piece(int index) const { @@ -267,7 +267,7 @@ namespace libtorrent // the length of one piece // if this is 0, the torrent_info is // in an uninitialized state - size_type m_piece_length; + int m_piece_length; // the sha-1 hashes of each piece std::vector m_piece_hash; diff --git a/libtorrent/src/alert.cpp b/libtorrent/src/alert.cpp index cb89147da..be6f718ee 100755 --- a/libtorrent/src/alert.cpp +++ b/libtorrent/src/alert.cpp @@ -95,7 +95,7 @@ namespace libtorrent { nsec -= 1000000000; xt.sec += 1; } - xt.nsec = nsec; + xt.nsec = boost::xtime::xtime_nsec_t(nsec); if (!m_condition.timed_wait(lock, xt)) return 0; TORRENT_ASSERT(!m_alerts.empty()); if (m_alerts.empty()) return 0; diff --git a/libtorrent/src/bt_peer_connection.cpp b/libtorrent/src/bt_peer_connection.cpp index e76c652cb..d70e7af31 100755 --- a/libtorrent/src/bt_peer_connection.cpp +++ b/libtorrent/src/bt_peer_connection.cpp @@ -1177,6 +1177,7 @@ namespace libtorrent } catch (std::exception& exc) { + (void)exc; #ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << "invalid extended handshake: " << exc.what() << "\n"; #endif @@ -1208,7 +1209,7 @@ namespace libtorrent if (listen_port->type() == entry::int_t && peer_info_struct() != 0) { - t->get_policy().update_peer_port(listen_port->integer() + t->get_policy().update_peer_port(int(listen_port->integer()) , peer_info_struct(), peer_info::incoming); } } @@ -1224,7 +1225,7 @@ namespace libtorrent if (entry* reqq = root.find_key("reqq")) { if (reqq->type() == entry::int_t) - m_max_out_request_queue = reqq->integer(); + m_max_out_request_queue = int(reqq->integer()); if (m_max_out_request_queue < 1) m_max_out_request_queue = 1; } diff --git a/libtorrent/src/disk_io_thread.cpp b/libtorrent/src/disk_io_thread.cpp index 4c44ca307..f9a572348 100644 --- a/libtorrent/src/disk_io_thread.cpp +++ b/libtorrent/src/disk_io_thread.cpp @@ -281,8 +281,8 @@ namespace libtorrent break; } } - ret = j.storage->read_impl(j.buffer, j.piece, j.offset - , j.buffer_size); + ret = int(j.storage->read_impl(j.buffer, j.piece, j.offset + , j.buffer_size)); // simulates slow drives // usleep(300); diff --git a/libtorrent/src/http_connection.cpp b/libtorrent/src/http_connection.cpp index 359bd52f6..92db5c485 100644 --- a/libtorrent/src/http_connection.cpp +++ b/libtorrent/src/http_connection.cpp @@ -266,7 +266,7 @@ void http_connection::on_read(asio::error_code const& e { m_parser.incoming(rcv_buf); } - catch (std::exception& e) + catch (std::exception&) { m_timer.cancel(); m_handler(asio::error::fault, m_parser, 0, 0); diff --git a/libtorrent/src/http_tracker_connection.cpp b/libtorrent/src/http_tracker_connection.cpp index b9581e862..d99c6f94a 100755 --- a/libtorrent/src/http_tracker_connection.cpp +++ b/libtorrent/src/http_tracker_connection.cpp @@ -222,12 +222,13 @@ namespace libtorrent if (value.find(' ') != std::string::npos) range_str >> bytes; range_str >> range_start >> dummy >> range_end; - if (!range_str || range_end < range_start) + if (!range_str || range_end < range_start + || range_end - range_start + 1 >= (std::numeric_limits::max)()) { throw std::runtime_error("invalid content-range in HTTP response: " + range_str.str()); } // the http range is inclusive - m_content_length = range_end - range_start + 1; + m_content_length = int(range_end - range_start + 1); } TORRENT_ASSERT(m_recv_pos <= (int)recv_buffer.left()); @@ -914,15 +915,15 @@ namespace libtorrent entry const* complete_ent = scrape_data.find_key("complete"); if (complete_ent && complete_ent->type() == entry::int_t) - complete = complete_ent->integer(); + complete = int(complete_ent->integer()); entry const* incomplete_ent = scrape_data.find_key("incomplete"); if (incomplete_ent && incomplete_ent->type() == entry::int_t) - incomplete = incomplete_ent->integer(); + incomplete = int(incomplete_ent->integer()); entry const* downloaded_ent = scrape_data.find_key("downloaded"); if (downloaded_ent && downloaded_ent->type() == entry::int_t) - downloaded = downloaded_ent->integer(); + downloaded = int(downloaded_ent->integer()); cb->tracker_scrape_response(tracker_req(), complete , incomplete, downloaded); @@ -977,10 +978,10 @@ namespace libtorrent int complete = -1; int incomplete = -1; - try { complete = e["complete"].integer(); } + try { complete = int(e["complete"].integer()); } catch(type_error&) {} - try { incomplete = e["incomplete"].integer(); } + try { incomplete = int(e["incomplete"].integer()); } catch(type_error&) {} cb->tracker_response(tracker_req(), peer_list, interval, complete diff --git a/libtorrent/src/kademlia/closest_nodes.cpp b/libtorrent/src/kademlia/closest_nodes.cpp index a11fe2559..7e24182de 100644 --- a/libtorrent/src/kademlia/closest_nodes.cpp +++ b/libtorrent/src/kademlia/closest_nodes.cpp @@ -110,11 +110,12 @@ void closest_nodes::invoke(node_id const& id, udp::endpoint addr) void closest_nodes::done() { std::vector results; - int num_results = m_table.bucket_size(); + int num_results = m_max_results; for (std::vector::iterator i = m_results.begin() - , end(m_results.end()); i != end && num_results >= 0; ++i) + , end(m_results.end()); i != end && num_results > 0; ++i) { if (i->flags & result::no_id) continue; + if ((i->flags & result::queried) == 0) continue; results.push_back(node_entry(i->id, i->addr)); --num_results; } diff --git a/libtorrent/src/kademlia/traversal_algorithm.cpp b/libtorrent/src/kademlia/traversal_algorithm.cpp index 8849b155b..b1e803354 100644 --- a/libtorrent/src/kademlia/traversal_algorithm.cpp +++ b/libtorrent/src/kademlia/traversal_algorithm.cpp @@ -88,7 +88,9 @@ boost::pool<>& traversal_algorithm::allocator() const void traversal_algorithm::traverse(node_id const& id, udp::endpoint addr) { - TORRENT_ASSERT(!id.is_all_zeros()); +#ifdef TORRENT_DHT_VERBOSE_LOGGING + TORRENT_LOG(traversal) << "node returned a list which included a node with id 0"; +#endif add_entry(id, addr, 0); } diff --git a/libtorrent/src/lsd.cpp b/libtorrent/src/lsd.cpp index 06e570f3c..8ec1a5daf 100644 --- a/libtorrent/src/lsd.cpp +++ b/libtorrent/src/lsd.cpp @@ -56,7 +56,7 @@ namespace libtorrent lsd::lsd(io_service& ios, address const& listen_interface , peer_callback_t const& cb) : m_callback(cb) - , m_retry_count(0) + , m_retry_count(1) , m_socket(ios, udp::endpoint(address_v4::from_string("239.192.152.143"), 6771) , bind(&lsd::on_announce, self(), _1, _2, _3)) , m_broadcast_timer(ios) @@ -81,7 +81,7 @@ void lsd::announce(sha1_hash const& ih, int listen_port) "\r\n\r\n"; std::string const& msg = btsearch.str(); - m_retry_count = 0; + m_retry_count = 1; asio::error_code ec; m_socket.send(msg.c_str(), int(msg.size()), ec); if (ec) diff --git a/libtorrent/src/metadata_transfer.cpp b/libtorrent/src/metadata_transfer.cpp index 228566ed8..0d1aea195 100644 --- a/libtorrent/src/metadata_transfer.cpp +++ b/libtorrent/src/metadata_transfer.cpp @@ -275,7 +275,7 @@ namespace libtorrent { namespace entry const& messages = h["m"]; if (entry const* index = messages.find_key("LT_metadata")) { - m_message_index = index->integer(); + m_message_index = int(index->integer()); return true; } else diff --git a/libtorrent/src/peer_connection.cpp b/libtorrent/src/peer_connection.cpp index 38e80c895..5eef805fe 100755 --- a/libtorrent/src/peer_connection.cpp +++ b/libtorrent/src/peer_connection.cpp @@ -245,7 +245,7 @@ namespace libtorrent t->get_policy().peer_is_interesting(*this); } // may throw an asio error if socket has disconnected - catch (std::exception& e) {} + catch (std::exception&) {} TORRENT_ASSERT(is_interesting() == interested); } @@ -1107,7 +1107,7 @@ namespace libtorrent "s: " << r.start << " | " "l: " << r.length << " | " "i: " << m_peer_interested << " | " - "t: " << (int)t->torrent_file().piece_size(r.piece) << " | " + "t: " << t->torrent_file().piece_size(r.piece) << " | " "n: " << t->torrent_file().num_pieces() << " ]\n"; #endif write_reject_request(r); @@ -1127,7 +1127,7 @@ namespace libtorrent "s: " << r.start << " | " "l: " << r.length << " | " "i: " << m_peer_interested << " | " - "t: " << (int)t->torrent_file().piece_size(r.piece) << " | " + "t: " << t->torrent_file().piece_size(r.piece) << " | " "n: " << t->torrent_file().num_pieces() << " ]\n"; (*m_logger) << time_now_string() @@ -1194,7 +1194,7 @@ namespace libtorrent "s: " << r.start << " | " "l: " << r.length << " | " "i: " << m_peer_interested << " | " - "t: " << (int)t->torrent_file().piece_size(r.piece) << " | " + "t: " << t->torrent_file().piece_size(r.piece) << " | " "n: " << t->torrent_file().num_pieces() << " | " "h: " << t->have_piece(r.piece) << " | " "block_limit: " << t->block_size() << " ]\n"; @@ -1787,7 +1787,7 @@ namespace libtorrent int block_offset = block.block_index * t->block_size(); int block_size - = (std::min)((int)t->torrent_file().piece_size(block.piece_index)-block_offset, + = (std::min)(t->torrent_file().piece_size(block.piece_index)-block_offset, t->block_size()); TORRENT_ASSERT(block_size > 0); TORRENT_ASSERT(block_size <= t->block_size()); @@ -1899,7 +1899,7 @@ namespace libtorrent piece_block block = m_request_queue.front(); int block_offset = block.block_index * t->block_size(); - int block_size = (std::min)((int)t->torrent_file().piece_size( + int block_size = (std::min)(t->torrent_file().piece_size( block.piece_index) - block_offset, t->block_size()); TORRENT_ASSERT(block_size > 0); TORRENT_ASSERT(block_size <= t->block_size()); @@ -1945,7 +1945,7 @@ namespace libtorrent #endif block_offset = block.block_index * t->block_size(); - block_size = (std::min)((int)t->torrent_file().piece_size( + block_size = (std::min)(t->torrent_file().piece_size( block.piece_index) - block_offset, t->block_size()); TORRENT_ASSERT(block_size > 0); TORRENT_ASSERT(block_size <= t->block_size()); @@ -1990,7 +1990,7 @@ namespace libtorrent void close_socket_ignore_error(boost::shared_ptr s) { - try { s->close(); } catch (std::exception& e) {} + try { s->close(); } catch (std::exception&) {} } void peer_connection::timed_out() diff --git a/libtorrent/src/policy.cpp b/libtorrent/src/policy.cpp index c577371d8..1b6a60cba 100755 --- a/libtorrent/src/policy.cpp +++ b/libtorrent/src/policy.cpp @@ -1111,15 +1111,6 @@ namespace libtorrent if (flags & 0x01) i->second.pe_support = true; #endif if (flags & 0x02) i->second.seed = true; - - // try to send a DHT ping to this peer - // as well, to figure out if it supports - // DHT (uTorrent and BitComet doesn't - // advertise support) -#ifndef TORRENT_DISABLE_DHT - udp::endpoint node(remote.address(), remote.port()); - m_torrent->session().add_dht_node(node); -#endif } else { diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 0a6b7176c..025437977 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -1024,6 +1024,15 @@ namespace detail async_accept(listener); return; } +#endif +#ifdef TORRENT_BSD + // Leopard sometimes generates an "invalid argument" error. It seems to be + // non-fatal and we have to do another async_accept. + if (e.value() == EINVAL) + { + async_accept(listener); + return; + } #endif if (m_alerts.should_post(alert::fatal)) { @@ -1603,7 +1612,7 @@ namespace detail nsec -= 1000000000; xt.sec += 1; } - xt.nsec = nsec; + xt.nsec = boost::xtime::xtime_nsec_t(nsec); boost::thread::sleep(xt); } diff --git a/libtorrent/src/storage.cpp b/libtorrent/src/storage.cpp index fc4b59656..062902a63 100755 --- a/libtorrent/src/storage.cpp +++ b/libtorrent/src/storage.cpp @@ -541,9 +541,9 @@ namespace libtorrent for (entry::list_type::iterator i = l.begin(); i != l.end(); ++i) { - file_sizes.push_back(std::pair( + file_sizes.push_back(std::make_pair( i->list().front().integer() - , i->list().back().integer())); + , std::time_t(i->list().back().integer()))); } if (file_sizes.empty()) @@ -818,7 +818,7 @@ namespace libtorrent == file_iter->path); #endif - size_type actual_read = in->read(buf + buf_pos, read_bytes); + int actual_read = int(in->read(buf + buf_pos, read_bytes)); if (read_bytes != actual_read) { @@ -1702,8 +1702,8 @@ namespace libtorrent m_piece_data.resize(int(m_info->piece_length())); int piece_size = int(m_info->piece_size(m_current_slot)); - int num_read = m_storage->read(&m_piece_data[0] - , m_current_slot, 0, piece_size); + int num_read = int(m_storage->read(&m_piece_data[0] + , m_current_slot, 0, piece_size)); // if the file is incomplete, skip the rest of it if (num_read != piece_size) diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index 81d091a35..a65cf6fb8 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -102,7 +102,7 @@ namespace // if pieces are too small, adjust the block size if (i.piece_length() < default_block_size) { - return static_cast(i.piece_length()); + return i.piece_length(); } // otherwise, go with the default @@ -337,7 +337,7 @@ namespace libtorrent peer_request torrent::to_req(piece_block const& p) { int block_offset = p.block_index * m_block_size; - int block_size = (std::min)((int)torrent_file().piece_size( + int block_size = (std::min)(torrent_file().piece_size( p.piece_index) - block_offset, m_block_size); TORRENT_ASSERT(block_size > 0); TORRENT_ASSERT(block_size <= m_block_size); @@ -403,8 +403,8 @@ namespace libtorrent m_storage = m_owning_storage.get(); m_block_size = calculate_block_size(*m_torrent_file, m_default_block_size); m_picker.reset(new piece_picker( - static_cast(m_torrent_file->piece_length() / m_block_size) - , static_cast((m_torrent_file->total_size()+m_block_size-1)/m_block_size))); + m_torrent_file->piece_length() / m_block_size + , int((m_torrent_file->total_size()+m_block_size-1)/m_block_size))); std::vector const& url_seeds = m_torrent_file->url_seeds(); std::copy(url_seeds.begin(), url_seeds.end(), std::inserter(m_web_seeds @@ -775,8 +775,7 @@ namespace libtorrent const std::vector& dl_queue = m_picker->get_download_queue(); - const int blocks_per_piece = static_cast( - piece_size / m_block_size); + const int blocks_per_piece = piece_size / m_block_size; for (std::vector::const_iterator i = dl_queue.begin(); i != dl_queue.end(); ++i) @@ -1702,7 +1701,7 @@ namespace libtorrent m_host_resolver.async_resolve(q, m_ses.m_strand.wrap( bind(&torrent::on_name_lookup, shared_from_this(), _1, _2, url, a))); } - catch (std::exception& exc) + catch (std::exception&) { TORRENT_ASSERT(false); }; @@ -1987,7 +1986,7 @@ namespace libtorrent pi.finished = (int)i->finished; pi.writing = (int)i->writing; pi.requested = (int)i->requested; - int piece_size = torrent_file().piece_size(i->index); + int piece_size = int(torrent_file().piece_size(i->index)); for (int j = 0; j < pi.blocks_in_piece; ++j) { block_info& bi = pi.blocks[j]; @@ -2178,7 +2177,7 @@ namespace libtorrent #endif m_policy.new_connection(*p); } - catch (std::exception& e) + catch (std::exception&) { throw; } @@ -2864,6 +2863,13 @@ namespace libtorrent m_storage->async_release_files( bind(&torrent::on_torrent_paused, shared_from_this(), _1, _2)); } + else + { + if (alerts().should_post(alert::warning)) + { + alerts().post_alert(torrent_paused_alert(get_handle(), "torrent paused")); + } + } } void torrent::resume() @@ -2967,6 +2973,7 @@ namespace libtorrent } catch (std::exception& e) { + (void)e; #ifdef TORRENT_VERBOSE_LOGGING (*p->m_logger) << "**ERROR**: " << e.what() << "\n"; #endif @@ -3053,8 +3060,8 @@ namespace libtorrent size_type done = 0; while (size > 0) { - size_type bytes_step = (std::min)(m_torrent_file->piece_size(ret.piece) - - ret.start, size); + size_type bytes_step = (std::min)(size_type(m_torrent_file->piece_size(ret.piece) + - ret.start), size); if (m_have_pieces[ret.piece]) done += bytes_step; ++ret.piece; ret.start = 0; @@ -3177,7 +3184,7 @@ namespace libtorrent if (st.total_wanted == 0) st.progress = 1.f; else st.progress = st.total_wanted_done - / static_cast(st.total_wanted); + / static_cast(st.total_wanted); st.pieces = &m_have_pieces; st.num_pieces = m_num_pieces; diff --git a/libtorrent/src/torrent_handle.cpp b/libtorrent/src/torrent_handle.cpp index 5dfab5480..fbfebbf62 100755 --- a/libtorrent/src/torrent_handle.cpp +++ b/libtorrent/src/torrent_handle.cpp @@ -485,7 +485,7 @@ namespace libtorrent session_impl::mutex_t::scoped_lock l1(m_ses->m_mutex); mutex::scoped_lock l2(m_chk->m_mutex); torrent* t = find_torrent(m_ses, m_chk, m_info_hash); - return t; + return t != 0; } entry torrent_handle::write_resume_data() const diff --git a/libtorrent/src/torrent_info.cpp b/libtorrent/src/torrent_info.cpp index 0aac5a7ba..57c8a9737 100755 --- a/libtorrent/src/torrent_info.cpp +++ b/libtorrent/src/torrent_info.cpp @@ -340,7 +340,7 @@ namespace libtorrent m_info_hash = h.final(); // extract piece length - m_piece_length = (int)info["piece length"].integer(); + m_piece_length = int(info["piece length"].integer()); if (m_piece_length <= 0) throw std::runtime_error("invalid torrent. piece length <= 0"); // extract file name (or the directory name if it's a multifile libtorrent) @@ -497,7 +497,7 @@ namespace libtorrent std::string const& hostname = iter->string(); ++iter; int port = 6881; - if (l.end() != iter) port = iter->integer(); + if (l.end() != iter) port = int(iter->integer()); m_nodes.push_back(std::make_pair(hostname, port)); } } @@ -817,7 +817,7 @@ namespace libtorrent // ------- end deprecation ------- - size_type torrent_info::piece_size(int index) const + int torrent_info::piece_size(int index) const { TORRENT_ASSERT(index >= 0 && index < num_pieces()); if (index == num_pieces()-1) @@ -826,7 +826,7 @@ namespace libtorrent - (num_pieces() - 1) * piece_length(); TORRENT_ASSERT(size > 0); TORRENT_ASSERT(size <= piece_length()); - return size; + return int(size); } else return piece_length(); @@ -882,12 +882,13 @@ namespace libtorrent } std::vector torrent_info::map_block(int piece, size_type offset - , int size, bool storage) const + , int size_, bool storage) const { TORRENT_ASSERT(num_files() > 0); std::vector ret; size_type start = piece * (size_type)m_piece_length + offset; + size_type size = size_; TORRENT_ASSERT(start + size <= m_total_size); // find the file iterator and file offset @@ -926,8 +927,8 @@ namespace libtorrent size_type offset = file_offset + file_at(file_index, storage).offset; peer_request ret; - ret.piece = offset / piece_length(); - ret.start = offset - ret.piece * piece_length(); + ret.piece = int(offset / piece_length()); + ret.start = int(offset - ret.piece * piece_length()); ret.length = size; return ret; } diff --git a/libtorrent/src/tracker_manager.cpp b/libtorrent/src/tracker_manager.cpp index 19da33d4b..eb1f4cfd3 100755 --- a/libtorrent/src/tracker_manager.cpp +++ b/libtorrent/src/tracker_manager.cpp @@ -352,7 +352,7 @@ namespace libtorrent m_timeout.async_wait(m_strand.wrap( bind(&timeout_handler::timeout_callback, self(), _1))); } - catch (std::exception& e) + catch (std::exception&) { TORRENT_ASSERT(false); } diff --git a/libtorrent/src/upnp.cpp b/libtorrent/src/upnp.cpp index dac6ef91f..24cb7769b 100644 --- a/libtorrent/src/upnp.cpp +++ b/libtorrent/src/upnp.cpp @@ -216,6 +216,7 @@ try } catch (std::exception& e) { + (void)e; #ifdef TORRENT_UPNP_LOGGING m_log << time_now_string() << " *** Connection failed to: " << d.url @@ -302,6 +303,7 @@ try } catch (std::exception& e) { + (void)e; #ifdef TORRENT_UPNP_LOGGING m_log << time_now_string() << " <== (" << from << ") Rootdevice responded with incorrect HTTP packet. Ignoring device (" << e.what() << ")" << std::endl; @@ -449,6 +451,7 @@ try } catch (std::exception& e) { + (void)e; #ifdef TORRENT_UPNP_LOGGING m_log << time_now_string() << " *** Connection failed to: " << d.url diff --git a/libtorrent/src/ut_pex.cpp b/libtorrent/src/ut_pex.cpp index d1248637c..18c37cda4 100644 --- a/libtorrent/src/ut_pex.cpp +++ b/libtorrent/src/ut_pex.cpp @@ -202,7 +202,7 @@ namespace libtorrent { namespace if (entry const* index = messages.find_key(extension_name)) { - m_message_index = index->integer(); + m_message_index = int(index->integer()); return true; } else diff --git a/libtorrent/src/web_peer_connection.cpp b/libtorrent/src/web_peer_connection.cpp index 54eefb8fc..3e390ac4f 100755 --- a/libtorrent/src/web_peer_connection.cpp +++ b/libtorrent/src/web_peer_connection.cpp @@ -486,7 +486,7 @@ namespace libtorrent int file_index = m_file_requests.front(); peer_request in_range = info.map_file(file_index, range_start - , range_end - range_start); + , int(range_end - range_start)); peer_request front_request = m_requests.front();