Commit Graph

450 Commits

Author SHA1 Message Date
Arvid Norberg eecc78b931 dll export fix + reverting upload slot change 2009-07-26 02:27:52 +00:00
Arvid Norberg eb66830dc3 simplified auto scrape 2009-07-24 08:25:07 +00:00
Arvid Norberg 137d2d63f5 cleaned up policy. Moved logic from policy to torrent 2009-07-23 04:38:52 +00:00
Arvid Norberg b437e2c743 fixed get_ip_filter 2009-07-21 04:42:19 +00:00
Andrew Resch c401c65dfb Add get_ip_filter() to session 2009-07-21 01:52:37 +00:00
Arvid Norberg ae3be201c4 reduced the number of floating point operations to better support systems with no FPU 2009-07-19 04:59:27 +00:00
Arvid Norberg c9a789d86f made the upload slot setting be a minimum for the rate based auto unchoke algorithm 2009-07-18 22:55:07 +00:00
Arvid Norberg db165942a7 oportunistic mingw fix 2009-06-30 23:03:54 +00:00
Arvid Norberg 499d4dfbb4 cleaned up left-over logging 2009-06-27 19:35:20 +00:00
Arvid Norberg 93e1c70263 allow 0 upload slots. added test for allow fast support for sending pieces to choked peers 2009-06-20 23:23:41 +00:00
Arvid Norberg 6b048dc85e fixed bug in connect candidate counter 2009-06-18 16:16:41 +00:00
Arvid Norberg 8af5211fb5 fix deadlock when upnp or natpmp fails to start 2009-06-13 10:45:07 +00:00
Arvid Norberg f20f63f865 fixed deadlock in some session member functions 2009-06-13 04:09:54 +00:00
Arvid Norberg 07bcb3545a converted a whole lot of error strings into error_codes. Documented some previously undocumented alerts as well as all the error codes 2009-06-12 16:40:38 +00:00
Arvid Norberg f0134c1b11 improved disk error handling and expanded use of error_code in error reporting 2009-06-10 08:30:55 +00:00
Arvid Norberg a9a12a2391 fix build with boost-1.34.1 2009-06-03 07:22:43 +00:00
Arvid Norberg 745a16ec09 watchdog for stalled queued checking torrents 2009-05-30 02:38:34 +00:00
Andrew Resch 6242ae051e added ability to give seeding torrents preference to active slots 2009-05-27 19:27:12 +00:00
Arvid Norberg e744174f9a removed dead code 2009-05-27 16:49:28 +00:00
Arvid Norberg bb47b2924c fix coalesce reads and writes setting 2009-05-25 07:46:31 +00:00
Arvid Norberg 30c704523c caches the time every 100 ms and use the cache where high resolution timer is not needed 2009-05-25 02:45:51 +00:00
Daniel Wallin 68629eb6bc Split peer list into IPv4 and IPv6 peers. Saves 12 bytes per IPv4 peer. 2009-05-24 21:49:19 +00:00
Arvid Norberg a89d6cced1 clean up some disk cache duplication of logic and added another memory usage optimization for the write cache 2009-05-24 00:12:53 +00:00
Arvid Norberg e3c07c0934 converted some recursive mutexes to regular ones 2009-05-23 21:36:09 +00:00
Arvid Norberg ae8488fb91 improved read cache memory efficiency 2009-05-23 19:27:27 +00:00
Arvid Norberg c1d9198dc3 added largest_contiguous cache flush algorithm 2009-05-23 07:35:45 +00:00
Arvid Norberg 0127edac14 added disk-checking delay, to leave room for other disk operations while checking a torrent 2009-05-22 06:32:39 +00:00
Arvid Norberg ad157d49d2 fixed bug that prevented buffer optimization 2009-05-19 06:51:30 +00:00
Arvid Norberg a51dfa50f5 renamed peer_from_tracker to add_peer 2009-05-15 22:07:19 +00:00
Arvid Norberg 1eda63c4f5 avoid using ' in peer ids, since there are buggy trackers that don't support it 2009-05-14 21:07:49 +00:00
Arvid Norberg 31c422df0a added feature to set a separate global rate limit for local peers 2009-05-14 17:21:19 +00:00
Arvid Norberg 00ccf9064e optimized memory usage in the DHT, and added some handling for out-of-memory cases 2009-05-13 22:18:41 +00:00
Arvid Norberg c8066aabd8 fixed policy::peer cast bug (introduced when optimizing the peer allocation) 2009-05-13 16:14:20 +00:00
Arvid Norberg 136f101449 when reaching peer list size limit, rank peers to be removed. Fix for updating IP filter 2009-05-11 20:23:47 +00:00
Arvid Norberg 1eb2799a03 added more allocation logging for statistics builds. Identified and fixed some memory waste 2009-05-07 20:30:20 +00:00
Arvid Norberg c8176cca55 optimized peer storage in resume data an in memory. Should use far less memory than previously for the peer list. Introduced peer source affinity, to avoid problem with a peer list that's diluted with stale peers 2009-05-06 22:36:24 +00:00
Arvid Norberg 6c03035aa0 added total number of peers logging to session statistics 2009-05-04 06:56:29 +00:00
Arvid Norberg 06b609aa1f fixed unchoke bug. made the automatic unchoke strategy the default 2009-05-02 03:15:52 +00:00
Arvid Norberg 84dda7b617 support for adjusting the socket buffer sizes through session_settings 2009-05-01 04:59:15 +00:00
Arvid Norberg 3cf34e3a91 greatly optimised memory usage for peer list 2009-04-30 05:49:46 +00:00
Arvid Norberg 7109b86566 greatly simplified the rate limiter and generalized all rate limits (peer, torrent, global) to allow for arbitrary rate limit configurations 2009-04-26 00:21:59 +00:00
Arvid Norberg 6b69f1d8c4 fixed crash when shutting down while checking a torrent 2009-04-25 08:45:13 +00:00
Arvid Norberg 189d618261 improved IPv6 support (skips unsupported tests on windows) 2009-04-13 05:11:44 +00:00
Arvid Norberg 6a11d6ee4e IPv6 tracker fix 2009-04-12 00:37:06 +00:00
Arvid Norberg 41be942ae7 experimental support for incoming connections over socks (untested) 2009-04-09 01:04:49 +00:00
Arvid Norberg b5bb51c6af cut out more IPv6 code if not supported 2009-04-04 16:59:53 +00:00
Arvid Norberg aba5b2e9d0 dropped some iostream dependencies 2009-04-04 09:52:25 +00:00
Arvid Norberg ac7e4fed7e more missing wchar_t support 2009-04-04 08:32:23 +00:00
Arvid Norberg db8487be46 auto unchoke improvement 2009-04-04 07:55:34 +00:00
Arvid Norberg d7eb787c88 reset the io_service in case it exits prematurely 2009-03-31 07:57:57 +00:00
Arvid Norberg 1a6d2f86b9 add compile time option to disable IPv6 support 2009-03-31 07:45:54 +00:00
Arvid Norberg db9236fcf8 don't try IPv6 on windows if it's not installed 2009-03-27 18:44:40 +00:00
Arvid Norberg 7aacfca292 made the examples build without exception support. added overloads of add_torrent() and add_magnet_uri() that don't throw 2009-02-26 07:09:56 +00:00
Arvid Norberg b25a8db2a6 added more error codes. consolidated exception classes into one. moved over more places to use error_code instead of strings. fixed proper error handling for torrent_info 2009-02-23 01:21:19 +00:00
Arvid Norberg 63a2522014 fixed some warnings 2009-02-13 07:13:03 +00:00
Arvid Norberg 72531255bc define boost::throw_exception when building with no exceptions 2009-02-11 17:45:12 +00:00
Arvid Norberg 5c12db28d2 added option to lock disk cache in physical memory 2009-02-06 09:46:13 +00:00
Arvid Norberg 532a5f477d fixed checking files issue 2009-02-03 17:35:41 +00:00
Arvid Norberg 1ac8f806fa added seed mode support (lazy hash checking) 2009-02-03 07:46:24 +00:00
Arvid Norberg 2623037482 local peers are excempt from unchoke slots. #469 2009-01-28 06:14:21 +00:00
Arvid Norberg 0ba2e2cdbd fixed issue where torrents that failed checking would not resume checking when the error was cleared. One side effect of this fix is that it should now be possible to pause checking torrents with the 0.14 branch 2009-01-27 09:18:51 +00:00
Arvid Norberg fd8a07ac15 fixed dht race condition (confirmed to work on windows too) 2009-01-24 18:29:33 +00:00
Arvid Norberg 76cea23b4c cleanup of previous check-in. fixing boost-1.34 compatibility and syntax error 2009-01-23 17:06:23 +00:00
Arvid Norberg 9b5aa967b0 fixed race condition when saving DHT state 2009-01-23 16:40:00 +00:00
Arvid Norberg b3a17b1787 added disk buffer instrumentation and log parser 2009-01-23 09:13:31 +00:00
Arvid Norberg 9a9f08f70f enables teredo support on windows 2009-01-21 01:39:13 +00:00
Arvid Norberg 8aa43b682b listen port cleanup 2009-01-19 08:31:31 +00:00
Arvid Norberg cfd116ffad made disk_io_settings be synchronized through the job queue 2009-01-10 05:46:02 +00:00
Arvid Norberg c21edfa6f1 fixed bug preventing clients to change the disk cache expiration time 2009-01-09 18:18:46 +00:00
Arvid Norberg dacb1ac48d reverted async. call to torrent::start() since it creates an undesirable race condition for file operations 2009-01-02 08:58:51 +00:00
Arvid Norberg 06da1f8e8a added some session logging. added more disk-io-thread stats logging and parse script 2008-12-30 08:20:25 +00:00
Arvid Norberg 927f9623cb session stats improvements 2008-12-27 02:22:20 +00:00
Arvid Norberg 952ed687cd made session stats config build 2008-12-26 07:00:21 +00:00
Arvid Norberg c8988d79b9 fixed typo in earlier check-in and wrapped try-catch block in BOOST_NO_EXCEPTIONS 2008-12-25 23:51:16 +00:00
Arvid Norberg 5a201af5f5 don't send performance warnings for rate limits unless it's enabled. stats logging improvements 2008-12-25 22:26:02 +00:00
Arvid Norberg 9379e4414c removed limit of active torrents to the unchoked slots. Fixes #450. Also removed some dead code and fixed typos in comments 2008-12-25 22:19:14 +00:00
Arvid Norberg f6a9e44523 modified fix for #431 to make it actually build and work 2008-12-21 19:15:53 +00:00
Arvid Norberg 7b8663fa8b support for wide character paths for the GeoIP databases. Fixes #431 2008-12-21 08:48:06 +00:00
Arvid Norberg 16bfde875d tests don't need the default session features turned on 2008-12-20 23:06:06 +00:00
Arvid Norberg f1d981254a added session::set_alert_dispatch() for system specific message loop integration 2008-12-15 07:12:08 +00:00
Arvid Norberg 0638251289 added queued bytes to bandwidth manager and session_stats 2008-12-13 05:12:12 +00:00
Arvid Norberg 09b3a865ef fixed compiler flags in pkg-config file and made header files not depend on the NDEBUG define 2008-11-29 21:33:21 +00:00
Arvid Norberg 723aba6c24 solved issue with pausing checking torrents. Introduced a new state, checkin_resume_data, which a torrent is in while waiting for the disk io thread to verify the resume data, but before it has been determined wheter it should be queued for checking or not 2008-11-19 00:46:48 +00:00
Arvid Norberg 78abf8a340 made recent change where the TCP/IP overhead is take into account when rate limiting, optional 2008-11-18 11:14:44 +00:00
Arvid Norberg a48ffe36e0 improved natpmp logging and handling of mapped ports in session 2008-11-16 02:11:04 +00:00
Arvid Norberg 473f75e98a DHT fix where the node_id would get set after it was started and be inconsitent with rpc_manager and routing_table 2008-11-11 08:33:34 +00:00
Arvid Norberg 4abd27b40e initialize torrent object in libtorrent thread instead of in calling thread 2008-11-10 02:33:39 +00:00
Arvid Norberg 18d269dd62 DHT optimizations 2008-11-10 02:08:42 +00:00
Arvid Norberg 19c66a1826 exception fixes 2008-11-05 05:39:18 +00:00
Arvid Norberg f2c9e02994 fixed deadlock in dht code 2008-11-02 10:01:04 +00:00
Arvid Norberg d721e99026 fix windows build with verbose logging 2008-11-01 05:35:41 +00:00
Arvid Norberg 4dada930ac made torrents not wanting more peers whene they're shutting down. Closes out all connections in the connection queue explicitly when session is shutting down 2008-10-30 17:13:10 +00:00
Arvid Norberg 7fd2fd4732 added performance warnings for when the IP overhead eats up the entire up- or download rate limit 2008-10-28 06:45:42 +00:00
Arvid Norberg efcaee9c2d fix for when DHT is started before a listen port has been configured 2008-10-27 03:45:08 +00:00
Arvid Norberg 65c4b7ec13 fix for when removing a torrent when it is in the checking state 2008-10-26 09:23:00 +00:00
Arvid Norberg 8f7a3ddfe0 fix bug for when a torrent queued for checking was removed 2008-10-26 04:10:27 +00:00
Arvid Norberg 49c01d7754 moved UPNP_LOGGING out of upnp.cpp and added alerts for when upnp logs something 2008-10-22 01:12:14 +00:00
Arvid Norberg 54eb378a1e simplified is_active() function 2008-10-19 04:31:33 +00:00
Arvid Norberg f04e9e9875 made unchoke interval depend on piece size 2008-10-18 22:35:10 +00:00
Arvid Norberg 3d75732145 changed variant_stream to return a pointer instead of a reference when querying for underlying type (avoids exceptions) 2008-10-18 07:12:04 +00:00
Arvid Norberg cac6132aae don't resume a torrent if there aren't enough upload slots 2008-10-14 07:41:05 +00:00
Arvid Norberg fdadccf7a2 asserts for unchoke slot handling 2008-10-14 02:03:54 +00:00
Arvid Norberg 5710cdebf4 make auto-unchoke less likely to open up slots when maxed out 2008-10-14 00:56:44 +00:00
Arvid Norberg b355541a7d applied patch from Sergei Vorobyov to allow changing the limit on outstanding alerts 2008-10-07 05:46:42 +00:00
Arvid Norberg 1092c558e4 counts newly started torrents as active up to 2 minutes, to give them a chance to start downloading. Active torrents are not considered slow in the auto manager. 2008-10-01 05:25:18 +00:00
Arvid Norberg 195521db65 prevent new connections when shutting down 2008-09-30 01:14:27 +00:00
Arvid Norberg a3751cfcbe fixed bug in peer_connection::incoming_piece() in case blocks were skipped. Fixed warnings. 2008-09-25 20:12:53 +00:00
Arvid Norberg 1ac3b8298c report tracker bandwidth usage and include it in rate limiter 2008-09-22 00:15:05 +00:00
Arvid Norberg de2859d9b0 fixed incorrect assert 2008-09-21 23:23:52 +00:00
Arvid Norberg ea578a6acf adds ut_pex, ut_metadata and smart_ban by default in session constructor. Also starts upnp and nat-pmp by default. Fixes #399 2008-09-21 23:19:58 +00:00
Arvid Norberg 0338510b9b added more bandwidth monitoring of DHT and TCP/IP overhead. added monitoring of the running DHT lookups 2008-09-20 17:42:25 +00:00
Arvid Norberg cc67830faf support max_upload_slots of 0. #395 2008-09-06 21:16:04 +00:00
Arvid Norberg c88071ae10 fixed race when adding router nodes to the dht (router nodes should be added before it's started) 2008-09-02 06:37:40 +00:00
Arvid Norberg 0074b10b88 fix optimistic unchoke when there is no metadata 2008-09-02 05:54:05 +00:00
Arvid Norberg e670b2fa7f fixed indentation 2008-08-29 00:44:55 +00:00
Arvid Norberg 9625648026 filter loopback and local network IPs as external addresses. Re-open main_session.log when changing port (to create it in the right folder). Use a listen socket queue length of 5 instead of 0. It seemed like 0 meant 0 instead of OS chooses 2008-08-25 21:17:24 +00:00
Arvid Norberg 49e76f510f stop scraping torrents when session is paused 2008-07-19 07:45:15 +00:00
Arvid Norberg 72b99059e7 optimized policy::peer 2008-07-14 11:15:35 +00:00
Arvid Norberg c5af2c2eaf moved tracker announces into a timer instead of polling every second. Added state to properly send complete, started and stopped events 2008-07-12 08:25:19 +00:00
Arvid Norberg 486fb1082d reports event in tracker_announce_alert 2008-07-11 12:00:29 +00:00
Arvid Norberg 96ca475652 added redundant and failed byte counters to session 2008-07-11 07:30:04 +00:00
Arvid Norberg d2c53b50d5 timeout incoming connections 2008-07-10 10:35:11 +00:00
Arvid Norberg e576babbb8 changed the alerts to have categories and to be filtered with a bitmask instead of having a severity and be filtered by a severity level. 2008-07-06 12:22:56 +00:00
Andrew Resch 94cbac20cd Do not count downloads as seeds in the queue system. 2008-07-01 21:07:18 +00:00
Arvid Norberg d396ab7b17 added pause and resume to the session. Fixes #349 2008-06-29 19:08:30 +00:00
Arvid Norberg d1b2cd558e moved peer time out logic to second tick 2008-06-29 05:35:48 +00:00
cg25 ff3e80c42f Removed svn:executable property from {c,h}pp files in branches/RC_0_13 and
trunk.
2008-06-25 14:15:21 +00:00
Arvid Norberg 84221e05f8 checking torrents fix when aborting session 2008-06-24 12:17:42 +00:00
Andrew Resch 402da3c77c Make active_limit == -1 mean unlimited 2008-06-22 22:49:18 +00:00
Arvid Norberg 0f0ea269bc added an active torrent limit 2008-06-21 12:31:28 +00:00
Arvid Norberg d0e579826c added an option to not count inactive torrents against the limits for auto managed torrents 2008-06-21 09:15:29 +00:00
Arvid Norberg 7fe6c474ce fix auto manage bug related to checking torrents 2008-06-18 13:02:03 +00:00
Andrew Resch d70ec645d7 Make 'active_seeds' and 'active_downloads' use -1 as unlimited 2008-06-17 15:44:04 +00:00
Arvid Norberg b55670aa14 fixed typo 2008-06-16 22:33:42 +00:00
Arvid Norberg 6c24bd0774 moves force checked torrents to the end of the queue. Fixes #350 2008-06-16 22:27:14 +00:00
Arvid Norberg 7df5d4a9c6 changed queuing logic 2008-06-13 05:11:36 +00:00
Arvid Norberg 5923ef5b43 fixed file check ordering to respect the queue position. Fixes #350 2008-06-12 21:22:24 +00:00
Arvid Norberg 6db61166be recalculate queued torrents sooner when changing queuing settings 2008-06-12 06:58:42 +00:00
Arvid Norberg 31c9d378f5 completed queuing. It is now possible to change and query queue position of torrents. 2008-05-29 03:37:19 +00:00
Arvid Norberg 3910fe78de separated file_storage from torrent_info and create_torrent 2008-05-28 08:44:40 +00:00
Arvid Norberg 67354421fb introduced an error state for torrents. Torrents with an error are not restarted automatically 2008-05-20 07:57:44 +00:00
Arvid Norberg 777954ab3e automatically scrape auto managed torrents to keep track of downloader/seed ratio 2008-05-19 04:06:25 +00:00
Arvid Norberg c460704a5f streamlined class footprint by reducing padding 2008-05-19 02:52:32 +00:00
Arvid Norberg f296d5a64d limits the number of connections depending to getrlimit(). Fixes #232 2008-05-16 15:19:38 +00:00
Arvid Norberg f259e34f86 peer_connection fix for incoming connections 2008-05-12 10:10:39 +00:00
Arvid Norberg 068adcd9a9 indentation fix 2008-05-12 06:03:31 +00:00
Arvid Norberg f2ac4db1af changed the optimistic disconnect logic to be more efficient and configurable 2008-05-12 05:17:11 +00:00
Arvid Norberg bbf9c83edc initial support for icmp errors in the DHT 2008-05-08 00:22:17 +00:00
Arvid Norberg 73ef60e5fa seed rank fix 2008-05-07 08:24:16 +00:00
Arvid Norberg 9429ca4b1f replaced seed cycles with seed rank 2008-05-06 18:03:41 +00:00