Changeset 2095
- Timestamp:
- 10/31/07 07:49:48 (14 months ago)
- Files:
-
- 26 modified
- 14 copied
-
tags/deluge-0.5.6.2 (copied) (copied from trunk)
-
tags/deluge-0.5.6.2/ChangeLog (copied) (copied from trunk/ChangeLog) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/aux_/session_impl.hpp (modified) (3 diffs)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/connection_queue.hpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/http_tracker_connection.hpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/intrusive_ptr_base.hpp (copied) (copied from trunk/libtorrent/include/libtorrent/intrusive_ptr_base.hpp)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/storage.hpp (copied) (copied from trunk/libtorrent/include/libtorrent/storage.hpp)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/tracker_manager.hpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/udp_tracker_connection.hpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/src/broadcast_socket.cpp (copied) (copied from trunk/libtorrent/src/broadcast_socket.cpp)
-
tags/deluge-0.5.6.2/libtorrent/src/connection_queue.cpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/src/http_tracker_connection.cpp (modified) (4 diffs)
-
tags/deluge-0.5.6.2/libtorrent/src/session_impl.cpp (copied) (copied from trunk/libtorrent/src/session_impl.cpp) (7 diffs)
-
tags/deluge-0.5.6.2/libtorrent/src/storage.cpp (copied) (copied from trunk/libtorrent/src/storage.cpp)
-
tags/deluge-0.5.6.2/libtorrent/src/torrent.cpp (modified) (1 diff)
-
tags/deluge-0.5.6.2/libtorrent/src/tracker_manager.cpp (modified) (2 diffs)
-
tags/deluge-0.5.6.2/libtorrent/src/udp_tracker_connection.cpp (modified) (5 diffs)
-
tags/deluge-0.5.6.2/plugins/TorrentNotification/__init__.py (copied) (copied from trunk/plugins/TorrentNotification/__init__.py)
-
tags/deluge-0.5.6.2/plugins/WebUi/dbus_interface.py (copied) (copied from trunk/plugins/WebUi/dbus_interface.py)
-
tags/deluge-0.5.6.2/plugins/WebUi/deluge_webserver.py (copied) (copied from trunk/plugins/WebUi/deluge_webserver.py)
-
tags/deluge-0.5.6.2/plugins/WebUi/revno (copied) (copied from trunk/plugins/WebUi/revno)
-
tags/deluge-0.5.6.2/plugins/WebUi/templates/deluge/torrent_info.html (copied) (copied from trunk/plugins/WebUi/templates/deluge/torrent_info.html)
-
tags/deluge-0.5.6.2/plugins/WebUi/version (copied) (copied from trunk/plugins/WebUi/version)
-
tags/deluge-0.5.6.2/plugins/WebUi/webserver_framework.py (copied) (copied from trunk/plugins/WebUi/webserver_framework.py)
-
tags/deluge-0.5.6.2/setup.py (modified) (1 diff)
-
tags/deluge-0.5.6.2/src/common.py (modified) (1 diff)
-
trunk/ChangeLog (modified) (1 diff)
-
trunk/libtorrent/include/libtorrent/aux_/session_impl.hpp (modified) (3 diffs)
-
trunk/libtorrent/include/libtorrent/connection_queue.hpp (modified) (1 diff)
-
trunk/libtorrent/include/libtorrent/http_tracker_connection.hpp (modified) (1 diff)
-
trunk/libtorrent/include/libtorrent/tracker_manager.hpp (modified) (1 diff)
-
trunk/libtorrent/include/libtorrent/udp_tracker_connection.hpp (modified) (1 diff)
-
trunk/libtorrent/src/connection_queue.cpp (modified) (1 diff)
-
trunk/libtorrent/src/http_tracker_connection.cpp (modified) (4 diffs)
-
trunk/libtorrent/src/session_impl.cpp (modified) (7 diffs)
-
trunk/libtorrent/src/torrent.cpp (modified) (1 diff)
-
trunk/libtorrent/src/tracker_manager.cpp (modified) (2 diffs)
-
trunk/libtorrent/src/udp_tracker_connection.cpp (modified) (5 diffs)
-
trunk/setup.py (modified) (1 diff)
-
trunk/src/common.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/deluge-0.5.6.2/ChangeLog
r2092 r2095 2 2 * Set default piece size to 256-KiB in TorrentCreator plugin and add 2048KiB 3 3 as a size option. 4 * Fix a bug in Debian package that caused the UI to completely freeze when a 5 torrent finished 4 6 * Find and fix another shutdown bug that mostly Gutsy users were incountering 5 7 * Fix a couple of WebUI bugs, including the "index" page erroring out -
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/aux_/session_impl.hpp
r2069 r2095 376 376 boost::pool<> m_send_buffers; 377 377 378 // this is where all active sockets are stored. 379 // the selector can sleep while there's no activity on 380 // them 381 io_service m_io_service; 382 asio::strand m_strand; 383 378 384 // the file pool that all storages in this session's 379 385 // torrents uses. It sets a limit on the number of … … 389 395 // object. 390 396 disk_io_thread m_disk_thread; 391 392 // this is where all active sockets are stored.393 // the selector can sleep while there's no activity on394 // them395 io_service m_io_service;396 asio::strand m_strand;397 397 398 398 // this is a list of half-open tcp connections … … 647 647 void debug_log(const std::string& line) 648 648 { 649 (*m_ses.m_logger) << time_now_string() << " " <<line << "\n";649 (*m_ses.m_logger) << line << "\n"; 650 650 } 651 651 session_impl& m_ses; -
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/connection_queue.hpp
r2069 r2095 57 57 void limit(int limit); 58 58 int limit() const; 59 void close();60 59 61 60 #ifndef NDEBUG -
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/http_tracker_connection.hpp
r2069 r2095 131 131 , std::string const& password = ""); 132 132 133 void close();134 135 133 private: 136 134 -
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/tracker_manager.hpp
r2069 r2095 203 203 void fail(int code, char const* msg); 204 204 void fail_timeout(); 205 v irtual void close();205 void close(); 206 206 address const& bind_interface() const { return m_bind_interface; } 207 207 -
tags/deluge-0.5.6.2/libtorrent/include/libtorrent/udp_tracker_connection.hpp
r2069 r2095 75 75 , session_settings const& stn); 76 76 77 void close();78 79 77 private: 80 78 -
tags/deluge-0.5.6.2/libtorrent/src/connection_queue.cpp
r2069 r2095 87 87 } 88 88 89 void connection_queue::close()90 {91 m_timer.cancel();92 }93 94 89 void connection_queue::limit(int limit) 95 90 { m_half_open_limit = limit; } -
tags/deluge-0.5.6.2/libtorrent/src/http_tracker_connection.cpp
r2069 r2095 490 490 m_name_lookup.async_resolve(q, m_strand.wrap( 491 491 boost::bind(&http_tracker_connection::name_lookup, self(), _1, _2))); 492 set_timeout(req.event == tracker_request::stopped 493 ? m_settings.stop_tracker_timeout 494 : m_settings.tracker_completion_timeout 492 set_timeout(m_settings.tracker_completion_timeout 495 493 , m_settings.tracker_receive_timeout); 496 494 } … … 504 502 m_connection_ticket = -1; 505 503 fail_timeout(); 506 }507 508 void http_tracker_connection::close()509 {510 asio::error_code ec;511 m_socket.close(ec);512 m_name_lookup.cancel();513 if (m_connection_ticket > -1) m_cc.done(m_connection_ticket);514 m_connection_ticket = -1;515 m_timed_out = true;516 tracker_connection::close();517 504 } 518 505 … … 773 760 { 774 761 fail(m_parser.status_code(), m_parser.message().c_str()); 762 close(); 775 763 return; 776 764 } … … 834 822 } 835 823 #endif 836 close();837 824 } 838 825 -
tags/deluge-0.5.6.2/libtorrent/src/session_impl.cpp
r2089 r2095 548 548 , char const* listen_interface) 549 549 : m_send_buffers(send_buffer_size) 550 , m_strand(m_io_service) 550 551 , m_files(40) 551 , m_strand(m_io_service)552 552 , m_half_open(m_io_service) 553 553 , m_download_channel(m_io_service, peer_connection::download_channel) … … 676 676 #endif 677 677 m_timer.cancel(); 678 679 // close the listen sockets680 for (std::list<listen_socket_t>::iterator i = m_listen_sockets.begin()681 , end(m_listen_sockets.end()); i != end; ++i)682 {683 i->sock->close();684 }685 686 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)687 (*m_logger) << time_now_string() << " aborting all torrents\n";688 #endif689 678 // abort all torrents 690 679 for (torrent_map::iterator i = m_torrents.begin() … … 694 683 } 695 684 696 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) 697 (*m_logger) << time_now_string() << " aborting all connections\n"; 698 #endif 699 // abort all connections 700 for (connection_map::iterator i = m_connections.begin() 701 , end(m_connections.end()); i != end; ++i) 702 { 703 i->second->disconnect(); 704 } 705 706 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) 707 (*m_logger) << time_now_string() << " aborting all tracker requests\n"; 708 #endif 709 m_tracker_manager.abort_all_requests(); 710 711 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) 712 (*m_logger) << time_now_string() << " shutting down connection queue\n"; 713 #endif 714 m_half_open.close(); 685 m_io_service.stop(); 715 686 716 687 mutex::scoped_lock l2(m_checker_impl.m_mutex); … … 1515 1486 1516 1487 deadline_timer tracker_timer(m_io_service); 1488 // this will remove the port mappings 1489 if (m_natpmp.get()) 1490 m_natpmp->close(); 1491 if (m_upnp.get()) 1492 m_upnp->close(); 1517 1493 1518 1494 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) … … 1521 1497 session_impl::mutex_t::scoped_lock l(m_mutex); 1522 1498 1499 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) 1500 (*m_logger) << time_now_string() << " aborting all tracker requests\n"; 1501 #endif 1523 1502 m_tracker_manager.abort_all_requests(); 1524 1503 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) … … 2123 2102 entry session_impl::dht_state() const 2124 2103 { 2125 mutex_t::scoped_lock l(m_mutex);2126 if (!m_dht) return entry();2104 TORRENT_ASSERT(m_dht); 2105 mutex_t::scoped_lock l(m_mutex); 2127 2106 return m_dht->state(); 2128 2107 } … … 2160 2139 session_impl::~session_impl() 2161 2140 { 2141 abort(); 2142 2162 2143 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) 2163 2144 (*m_logger) << time_now_string() << "\n\n *** shutting down session *** \n\n"; 2164 2145 #endif 2165 abort(); 2146 // lock the main thread and abort it 2147 mutex_t::scoped_lock l(m_mutex); 2148 m_abort = true; 2149 m_io_service.stop(); 2150 l.unlock(); 2166 2151 2167 2152 #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) -
tags/deluge-0.5.6.2/libtorrent/src/torrent.cpp
r2069 r2095 3056 3056 void torrent::debug_log(const std::string& line) 3057 3057 { 3058 (*m_ses.m_logger) << time_now_string() << " " <<line << "\n";3058 (*m_ses.m_logger) << line << "\n"; 3059 3059 } 3060 3060 #endif -
tags/deluge-0.5.6.2/libtorrent/src/tracker_manager.cpp
r2072 r2095 303 303 m_completion_timeout = completion_timeout; 304 304 m_read_timeout = read_timeout; 305 m_start_time = m_read_time = time_now(); 305 m_start_time = time_now(); 306 m_read_time = time_now(); 306 307 307 308 m_timeout.expires_at((std::min)( 308 309 m_read_time + seconds(m_read_timeout) 309 , m_start_time + seconds((std::min)(m_completion_timeout 310 , m_read_timeout)))); 310 , m_start_time + seconds(m_completion_timeout))); 311 311 m_timeout.async_wait(m_strand.wrap(bind( 312 312 &timeout_handler::timeout_callback, self(), _1))); … … 344 344 m_timeout.expires_at((std::min)( 345 345 m_read_time + seconds(m_read_timeout) 346 , m_start_time + seconds((std::min)(m_completion_timeout 347 , m_read_timeout)))); 346 , m_start_time + seconds(m_completion_timeout))); 348 347 m_timeout.async_wait(m_strand.wrap( 349 348 bind(&timeout_handler::timeout_callback, self(), _1))); -
tags/deluge-0.5.6.2/libtorrent/src/udp_tracker_connection.cpp
r2069 r2095 97 97 , m_strand.wrap(boost::bind( 98 98 &udp_tracker_connection::name_lookup, self(), _1, _2))); 99 set_timeout(req.event == tracker_request::stopped 100 ? m_settings.stop_tracker_timeout 101 : m_settings.tracker_completion_timeout 99 set_timeout(m_settings.tracker_completion_timeout 102 100 , m_settings.tracker_receive_timeout); 103 101 } … … 159 157 void udp_tracker_connection::on_timeout() 160 158 { 161 asio::error_code ec; 162 m_socket.close(ec); 159 m_socket.close(); 163 160 m_name_lookup.cancel(); 164 161 fail_timeout(); 165 }166 167 void udp_tracker_connection::close()168 {169 asio::error_code ec;170 m_socket.close(ec);171 m_name_lookup.cancel();172 tracker_connection::close();173 162 } 174 163 … … 480 469 481 470 m_man.remove_request(this); 482 close();483 471 return; 484 472 } … … 556 544 { 557 545 m_man.remove_request(this); 558 close();559 546 return; 560 547 } … … 565 552 566 553 m_man.remove_request(this); 567 close();568 554 } 569 555 catch (std::exception& e) -
tags/deluge-0.5.6.2/setup.py
r2079 r2095 29 29 NAME = "deluge" 30 30 FULLNAME = "Deluge BitTorrent Client" 31 VERSION = "0.5.6. 15"31 VERSION = "0.5.6.2" 32 32 AUTHOR = "Zach Tibbitts, Alon Zakai, Marcos Pinto, Andrew Resch, Alex Dedul" 33 33 EMAIL = "zach@collegegeek.org, kripkensteiner@gmail.com, marcospinto@dipconsultants.com, alonzakai@gmail.com, rotmer@gmail.com" -
tags/deluge-0.5.6.2/src/common.py
r2057 r2095 33 33 34 34 PROGRAM_NAME = "Deluge" 35 PROGRAM_VERSION = "0.5.6. 15"35 PROGRAM_VERSION = "0.5.6.2" 36 36 37 37 CLIENT_CODE = "DE" -
trunk/ChangeLog
r2092 r2095 2 2 * Set default piece size to 256-KiB in TorrentCreator plugin and add 2048KiB 3 3 as a size option. 4 * Fix a bug in Debian package that caused the UI to completely freeze when a 5 torrent finished 4 6 * Find and fix another shutdown bug that mostly Gutsy users were incountering 5 7 * Fix a couple of WebUI bugs, including the "index" page erroring out -
trunk/libtorrent/include/libtorrent/aux_/session_impl.hpp
r2069 r2095 376 376 boost::pool<> m_send_buffers; 377 377 378 // this is where all active sockets are stored. 379 // the selector can sleep while there's no activity on 380 // them 381 io_service m_io_service; 382 asio::strand m_strand; 383 378 384 // the file pool that all storages in this session's 379 385 // torrents uses. It sets a limit on the number of … … 389 395 // object. 390 396 disk_io_thread m_disk_thread; 391 392 // this is where all active sockets are stored.393 // the selector can sleep while there's no activity on394 // them395 io_service m_io_service;396 asio::strand m_strand;397 397 398 398 // this is a list of half-open tcp connections … … 647 647 void debug_log(const std::string& line) 648 648 { 649 (*m_ses.m_logger) << time_now_string() << " " <<line << "\n";649 (*m_ses.m_logger) << line << "\n"; 650 650 } 651 651 session_impl& m_ses; -
trunk/libtorrent/include/libtorrent/connection_queue.hpp
r2069 r2095 57 57 void limit(int limit); 58 58 int limit() const; 59 void close();60 59 61 60 #ifndef NDEBUG -
trunk/libtorrent/include/libtorrent/http_tracker_connection.hpp
r2069 r2095 131 131 , std::string const& password = ""); 132 132 133 void close();134 135 133 private: 136 134 -
trunk/libtorrent/include/libtorrent/tracker_manager.hpp
r2069 r2095 203 203 void fail(int code, char const* msg); 204 204 void fail_timeout(); 205 v irtual void close();205 void close(); 206 206 address const& bind_interface() const { return m_bind_interface; } 207 207 -
trunk/libtorrent/include/libtorrent/udp_tracker_connection.hpp
r2069 r2095 75 75 , session_settings const& stn); 76 76 77 void close();78 79 77 private: 80 78 -
trunk/libtorrent/src/connection_queue.cpp
r2069 r2095 87 87 } 88 88 89 void connection_queue::close()90 {91 m_timer.cancel();92 }93 94 89 void connection_queue::limit(int limit) 95 90 { m_half_open_limit = limit; } -
trunk/libtorrent/src/http_tracker_connection.cpp
r2069 r2095 490 490 m_name_lookup.async_resolve(q, m_strand.wrap( 491 491 boost::bind(&http_tracker_connection::name_lookup, self(), _1, _2))); 492 set_timeout(req.event == tracker_request::stopped 493 ? m_settings.stop_tracker_timeout 494 : m_settings.tracker_completion_timeout 492 set_timeout(m_settings.tracker_completion_timeout 495 493 , m_settings.tracker_receive_timeout); 496 494 } … … 504 502 m_connection_ticket = -1; 505 503 fail_timeout(); 506 }507 508 void http_tracker_connection::close()509 {510 asio::error_code ec;511 m_socket.close(ec);512 m_name_lookup.cancel();513 if (m_connection_ticket > -1) m_cc.done(m_connection_ticket);
