1693 Commits

Author SHA1 Message Date
rakshasa b25af84ee8 * Bumping the copyright year to 2006.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@621 e378c898-3ddf-0310-93e7-cc216c733640
2006-01-10 00:46:50 +00:00
rakshasa 310589c4bf * Unlink the tied file when a torrent is erased.
* Remove torrents that are already tied from the expanded paths.

* Move the loop counter to Control.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@618 e378c898-3ddf-0310-93e7-cc216c733640
2006-01-09 18:54:57 +00:00
rakshasa f32c15878a * Fixed the log redraw which didn't happen as the display's scheduler
didn't get re-added to the task scheduler until a new event happened.

* Added redraw delay interval of 100ms, consider 50ms.

* Removed exceptions from core::DownloadStore::save.

* Added load, load_run, tied_stop and tied_remove to man-page.

* Cleaned up the command/option instances, move them to Control.

* PCB::load_up_chunk grabbed the errno from m_downChunk, not m_upChunk.

* Various string operations were moved to rak/string_manip.h.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@617 e378c898-3ddf-0310-93e7-cc216c733640
2006-01-06 21:14:49 +00:00
rakshasa 4431fd1652 * Fixed a regression that threw an exception for torrents with
empty directories.

* When receiving zero length pieces, remove them from the request list.

* Send the interested state before any requests as some clients,
BitTornado 0.7.14 and uTorrent 0.3.0, disconnect if a request has been
received while uninterested.

* WITH_POSIX_FALLOCATE configure macro should check against "yes", not
"no".

* The new priority queue would cause arg torrents to load before
session torrents in some cases. Fixed to perform the session torrent
tasks before loading arg torrents.

* Allow '*' wildcard in filenames when loading torrents.

* Added load, load_run, stop_tied and remove_tied settings which can
be used to scan a directory for new/removed torrents. These torrents
are tied to the lifetime of the torrent file.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@616 e378c898-3ddf-0310-93e7-cc216c733640
2006-01-03 21:43:01 +00:00
rakshasa 5a8a402745 * Minor cleanup in rtorrent.
* Changing priorities of closed torrents caused a crash due to empty
ChunkSelector, fixed.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@615 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-22 03:55:43 +00:00
rakshasa 2c5151def5 * Checked and fixed calls to priority_queue_insert to make sure they
don't end up in an infinite loop.

* Fixed a bug that caused failed chunk downloads to result in
ChunkSelector's forgetting to download them again.

* Added note to the man page about the schedule and schedule_remove
setting.

* Display the number of failed chunks in the client.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@612 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-20 19:12:15 +00:00
rakshasa 3989ae8975 * Disabled setting of uninterested when no more chunks can be
requested, this needs to be fixed.

* Minor adjustments to the usage of rak::priority_queue_insert.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@611 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-19 20:58:13 +00:00
rakshasa 4e8e5a18df * Clear the download rate when finishing a torrent.
* Fixed torrent::set_{bind,local}_address(...) so they update
correctly.

* Tweaked the time left display, show minutes instead of seconds.

* Add earlier check on validity of the socket address of
incoming/outgoing connection.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@610 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-18 23:49:00 +00:00
rakshasa e45f05ee98 * Added command scheduler, currently it only calls option handler.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@609 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-17 02:50:10 +00:00
rakshasa ca5b5e05ec * Removed ticks for downloads, use the global tick instead.
* Fixed rak::priority_queue.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@608 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-15 22:56:03 +00:00
rakshasa 7cc377b550 * Cleaned up rak::priority_queue.
* Added download time left display, need to tweak it.

* Removed libtorrent/src/download/download_setup.cc.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@607 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-09 05:22:36 +00:00
rakshasa 12ef47da3c * Replaced TaskScheduler with rak::priority_queue.
* Fixed an exception caused by initial hash check not properly
cleaning up HashQueue when canceling.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@606 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-08 21:19:53 +00:00
rakshasa ba7d61b532 * Fixed a buffer overflow when writting to the output buffer. This
would in some rare occasions cause memory to be corrupted. leading to
a crash.

* Added option for setting the http proxy and proccess's umask.

* Save the total uploaded for downloads between sessions.

* Moved from sigc++ to my own lightweight slot class for the task
scheduler. This saves some 5-600kb when compiled with debugging
symbols, 1-200kb without.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@605 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-05 07:59:29 +00:00
rakshasa 32a3619cd8 * Moved Timer to rak/timer.h.
* Added position affinity to ChunkSelector, still needs more work to
make it move forward without needing to finish all pieces.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@604 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-04 21:08:17 +00:00
rakshasa a1a07c47aa * Bumped version number to 0.8.1.
* Implemented ChunkSelector.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@603 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-04 00:20:47 +00:00
rakshasa f9614c405d * Added a workaround for the vfat truncate bug. This blocks for a
while, so either it needs some additional hack or make it a configure
option.

* Trigger a storage_error when files fail to resize.

* Fixed a bug in the priority code that caused it to skip some ranges.

* Added a check to make sure a CurlGet object is closed once it is
finished.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@602 e378c898-3ddf-0310-93e7-cc216c733640
2005-12-02 20:07:50 +00:00
rakshasa 98a8fc8638 * Improved error handling for settings. LibTorrent now consistently
throws torrent::input_error and rtorrent catches those and prints good
error messages.

* torrent::set_{bind,local}_address now accepts dns addresses.

* Fixed bug that caused multiple instances of the setting
up/download_rate to change the relative rate, rather than constant.

* Minor change to the way PCB decides to not request more pieces.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@601 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-24 17:21:32 +00:00
rakshasa 93c6369b69 * Added the ability to set the timeout in torrent::Http. Torrent
downloads now have longer timeout than tracker requests.

* Bound the '*' key in tracker list to disable a tracker.

* Added PollKQueue placeholder, implementation will come later.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@598 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-21 19:19:43 +00:00
rakshasa cbbad78b6a * Set "stopped" stated to newly added torrents, so they stay stopped
when restarting the client.

* Renamed Bencode::operator[] to Bencode::get_key.

* Added progress percentage for hash checking.

* Correctly update the delegator priority when loading resume data
with file priorities.

* Don't allow file names with '\0' in them.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@597 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-16 20:46:13 +00:00
rakshasa e8deac9f79 * Made ThrottleNode an object held by PCB, rather than ThrottleList
which now holds ThrottleNode*. Moved Rate from PCB to ThrottleNode.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@596 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-14 15:42:13 +00:00
rakshasa a97408328a * Cleanup of the API, got rid of "get_" prefix for alot of the calls.
* Tweaked the http get timeout, now it has a 60 second connect timeout
and a 360 second download timeout.

* Moved libtorrent/src/parse/download_constructor to src/download.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@595 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-12 15:31:12 +00:00
rakshasa 3db8179274 * Moved http get's user agent stuff to the client. It now uses
"rtorrent/CLIENT_VERSION/LIBRARY_VERSION".

* Using libcurl's timeout, set to 60 seconds, rather than in
TrackerHttp. This should make libcurl try different IP's.

* Minor cleanup of how file priorities are updated.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@594 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-08 21:14:32 +00:00
rakshasa b28621f839 * Dynamically changes the throttle interval depending on the current
rate and chunk size.

* Changed torrent::download_remove to take a torrent::Download, rather
than the info hash.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@592 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-03 16:26:08 +00:00
rakshasa 89e69adb7a * Added interface for changing download priority.
* More throttle fiddling.

* Pop the currently uploaded piece from the send list.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@591 e378c898-3ddf-0310-93e7-cc216c733640
2005-11-01 19:42:07 +00:00
rakshasa 1a68177eca * More fiddling of the throttle code.
* Fixed a bug that caused idle looping due to epoll_wait timeout using
msecs rather than usecs resolution.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@590 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-31 15:40:50 +00:00
rakshasa ce411252ac * More work on the new throttle code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@589 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-29 22:54:08 +00:00
rakshasa 5137aade10 * New throttle implementation, works to a certain degree but still
needs some work.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@588 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-29 00:55:21 +00:00
rakshasa da67bdfff1 * Added prefered encoding list using the "encoding_list = <enc>"
option.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@587 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-26 13:25:10 +00:00
rakshasa 7e861cf9f2 * Store and display the encoding for the currently used filename.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@586 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-25 20:15:26 +00:00
rakshasa eb8fecbc34 * Fixed various compiler warnings.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@585 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-24 10:40:55 +00:00
rakshasa dc2b1aa5d8 * Making a DownloadConstructor to replace src/parse/* stuff.
* Enabled throttle dependent global upload limit and added some stats
display to the client.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@584 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-22 19:36:38 +00:00
rakshasa 45781e8dbf * Got rid of some additional internal sigc++ calls.
* Changed print_hhmmss/ddmmyyyy to use a char buffer.

* Added error messages for failed torrent http/file downloads which
includes the url/filename.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@581 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-17 19:19:48 +00:00
rakshasa c99cc03d19 * Replaced most of the internal sigc++ slots and signals with a
lightweight version. This cut the size of the library w/debug by more
than 300kb. All (almost) the signals the client connects to are now in
DownloadWrapper.

* Fixed off-by-one error in the month displayed.

* Moved tracker url cleanup to src/parse and improved it.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@580 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-14 21:50:45 +00:00
rakshasa ad80247ba6 * Improved hash checking, it now stops a torrent if some chunk
mappings fail even though a file has been allocated.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@578 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-10 19:36:12 +00:00
rakshasa 881f515d03 * Scheduled tasks, like hash checking, didn't get called when
downloading with curl on epoll unless sockets triggered events.

* Checking whetever we're interested in a peer's pieces wasn't
finished, doh.

* Don't use shorter timeout for "stopped" tracker request, the client
now makes sure it shuts down within 5 seconds.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@577 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-07 20:01:38 +00:00
rakshasa 65573ec1ee * Converted some internal sigc++ calls to lightweight function
wrappers.

* Some client code cleanup.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@576 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-04 11:06:06 +00:00
rakshasa 33b7217627 * Working resource manager.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@570 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-23 23:49:53 +00:00
rakshasa 88b8afe025 * Replaced some sigc++ slots with lightweight callback classes.
* Almost done with global choke management, only need to sort and
debug. The API to change the setting will be added after the next
release.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@569 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-22 12:09:55 +00:00
rakshasa 108ad78d30 * Starting work on resource manager.
* Modified rak::accumulate to require accessing ::result instead of
using a reference.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@568 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-20 13:53:45 +00:00
rakshasa 94d31cc681 * Fixed various memory leaks/errors.
* Don't increment beyond end when incrementing a entry's completed
counter.

* Don't allow ChokeManager::try_unchoke to succeed when it has been
less than 10 seconds since the last unchoke.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@562 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-17 01:31:30 +00:00
rakshasa 5ada857c3e * Added lazy syncing of chunks.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@557 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-10 15:38:34 +00:00
rakshasa c347ccc439 * Use ChunkHandle instead of ChunkListNode*, this will include write
reference counter.

* Get errno message when chunks can't be allocated.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@556 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-09 16:12:29 +00:00
rakshasa 8732e457fa * Cleaned up socket read/write error handling.
* Fixed a bug where PeerConnectionSeed was reading the wrong type of
message.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@554 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-05 18:50:48 +00:00
rakshasa 3bd99aee50 * Fixed some bugs and cleaned up the code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@550 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-01 17:12:31 +00:00
rakshasa c568306a5a * Finished keep-alive in PeerConnectionSeed.
* Display the connection types for a download.

* Fixed HashTorrent so it properly erases the Chunks it holds.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@549 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-31 18:40:18 +00:00
rakshasa a1bffb4526 * Almost completed PeerConnectionSeed, only missing the keep-alive
message.

* Set "connection_seed = seed" by default.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@548 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-30 22:54:16 +00:00
rakshasa 2a1f3e12cc * Renamed read/write stuff to down/up.
* Adding incomplete PeerConnectionSeed.

* For every new peer connection it would traverse the local bitfield
to check if it was zero'ed, instead of using a cached value. Forgot to
change over when changing it from the BitFieldExt to the normal class.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@547 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-29 18:39:34 +00:00
rakshasa a28ed1c96b * File progress wasn't being updated as the index range iterator was
off by one.

* Removed ProtocolChunk, moved the functions to PeerConnectionBase,
remains to clean it up.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@546 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-27 15:44:56 +00:00
rakshasa abbe4dd675 * Changed the TaskScheduler so new tasks are inserted beyond the last
due task when executing.

* Moved stuff from torrent/torrent.cc to torrent::Manager.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@535 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-18 00:46:54 +00:00
rakshasa b0ac469262 * Removed PeerConnection::m_taskStall, use the keepalive task instead.
* Fixed typo in USE_ALIGNED check.

* Added checks to Tracker* to make sure m_taskTimeout isn't already
inserted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@534 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-17 19:20:38 +00:00