Commit Graph

297 Commits

Author SHA1 Message Date
rakshasa 34258bcfb2 * Added various TextElement flags and replaced WindowPeerInfo with a
WindowText.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@756 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-12 18:35:19 +00:00
rakshasa da0d5dbf22 * Added formatting to TextElementValue.
* Finished the download information screen, removed the redunant
entries in WindowPeerInfo.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@755 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-11 15:32:49 +00:00
rakshasa 3c634730c4 * Added TextElementValue*.
* The curl perform loop wasn't properly checking the returned pointer,
which caused a segfault with libcurl 7.15.5.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@754 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-10 21:24:10 +00:00
rakshasa ca58b43d8b * Starting work on ElementText for displaying generic information.
* If a storage error was thrown from make_directory in
EntryList::open, it would try to erase a FileMeta that wasn't inserted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@753 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-09 19:55:34 +00:00
rakshasa ba28df3ff2 * Fixed download menu.
* Use bold when ElementMenu loses focus.

* Added an exit slot to ElementBase and bind to that from withing the
subclasses.

* Moved peer info to ElementPeerList, accessed by the right
arrow. Download info will be moved to a seperate Element.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@752 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-07 16:31:55 +00:00
rakshasa 0b45062eb3 * Use varargs in Canvas::print.
* Added min/max size to display::Window. Added flags for windows that
should be on located at the left/bottom side of a Frame.

* Reversed print order in WindowLog*.

* Added display::TextElement and subclasses for flexible printing to a
char buffer with associated attributes. Added display::Attributes and
display::Canvas::print_attributes.

* Added display::WindowText for use with display::TextElement's.

* Added ui::ElementMenu for generic menus, and started work adding
this to ui::Download.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@751 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-06 18:20:56 +00:00
rakshasa 62beb9d9ed * Moved handling of events from DownloadList into ElementDownloadList
and WindowLog.

* Added bindings to input::TextInput and disabled other bindings while
it is active.

* ^K now sets ignore_commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@750 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-31 00:26:58 +00:00
rakshasa fa5ff92e24 * Moved all remaining classes to use the new display::Frame.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@749 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-29 00:22:26 +00:00
rakshasa 4c9fc671be * Allow Frame's to be located in both rows and columns. Improved min
height/width for windows.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@748 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-28 00:17:54 +00:00
rakshasa fc76a11d71 * UI refactoring, added display::Frame and started cleaning up the
code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@747 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-26 21:41:09 +00:00
rakshasa ef90f0f51e * Added resume functions for saving/loading tracker state.
* Added parameter to torrent::resume_save_progress to indicate that
only completed files are to be saved. This is used when the torrent is
active.

* Update the display when priority is changed.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@746 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-22 20:41:47 +00:00
rakshasa 652fd25c07 * Detect the amount of address space available for mapping chunks and
use that to decide when syncing is needed.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@745 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-21 20:19:55 +00:00
rakshasa 345c57e9bc * Replaced syncing chunks with ChunkList::sync_chunks which allows the
caller greater control through the use of flags. MS_SYNC is only used
if the caller either requires it or asks for remaining free diskspace
to be checked.

* Moved various flags from DownloadMain to DownloadInfo.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@744 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-19 21:09:19 +00:00
rakshasa b3fc488e5f * Initial work on a global chunk manager for controlling memory usage,
and checking if enough disk space is available for MS_ASYNC to be safe.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@743 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-19 00:42:23 +00:00
rakshasa e8a8fc7e1a * Minor fixes before release.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@740 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-08 22:04:12 +00:00
rakshasa 52bf80d704 * 'I' key set the download to ignore the start/stop_try commands.
* Added options for timeout_sync/safe_sync and max_chunks_queued.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@739 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-07 22:19:20 +00:00
rakshasa 63311270c9 * Adding the compiled man page.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@738 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-05 21:09:36 +00:00
rakshasa 082cbb6cc5 * Added "key_layout" option with support for azerty.
* Delayed the hash done signal.

* Allow quick hash checks that only handles invalid chunks.

* Show failed counter for peers.

* Updated the man page.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@737 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-05 20:12:01 +00:00
rakshasa 66bb95a26c * Select the proper encoding for a torrent's name so that multi-file
torrents get the right root directory.

* Properly clean up after catching a storage_error in
EntryList::open().

* Added a funtion to torrent::Download for syncing chunks to disk, and
made torrent::resume_save_progress(...) use it.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@736 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-04 22:48:43 +00:00
rakshasa c957d1b4d1 * Properly invalidate BlockTransfer's in Block so they get deleted.
* Added is_active flag to TrackerManager and don't reset the
up/download baseline in Download::start() when a request is queued.

* Remove the "started" filter in hashing view, so it starts hashing
stopped torrents.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@735 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-03 00:18:48 +00:00
rakshasa 26ffe74744 * Moved the resume code out of DownloadWrapper and made it use the
public API. The client can now use the various calls provided or
implement its own.

* 'U' now deletes the tied file in addition to clearing 'tied_to_file.

* Bound left arrow in chunks seen to return to peer list. Patch by
Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@734 e378c898-3ddf-0310-93e7-cc216c733640
2006-07-01 20:31:07 +00:00
rakshasa 9f2f427e9d * Fixed the transitions between skipping and downloading pieces.
* Added Object::merge_recursive.

* Save and set the chunks done count for closed torrents.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@733 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-30 01:02:41 +00:00
rakshasa 4b79a7c47f * Fixed the hashing so it properly starts and stops. When
DownloadList::pause is called it clears the "hashing" variable.

* Added convenience functions for retriving torrent::Object key's of
specific types.

* Iterate to the first visible transfer in the chunks seen view. Patch
by Josef Drexler.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@732 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-28 22:50:58 +00:00
rakshasa ee353bfc9f * Bound 'U' for clearing "tied_to_file".
* Fixed transfer list to mark peers that sent bad data once the chunk
has successfully passed the hash check.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@731 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-26 23:55:54 +00:00
rakshasa d35bef6791 * Expand the path when unlinking the tied file.
* Use DownloadWrapper* to identify hashing chunks, rather than the
info hash.

* When hashing fails, retry the most common blocks.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@729 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-24 23:48:26 +00:00
rakshasa 8be667e935 * When a chunk hash fails, copy the data to buffers and try again.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@728 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-23 00:14:44 +00:00
rakshasa 70eacfe738 * Reworked how hashing is queued, state must 1 and removed the
set_hash_failed hacks when closing, etc.

* Changed the attributes of blocks in transfer view.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@727 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-21 22:14:10 +00:00
rakshasa d2fc993514 * Changed the usage of rand() to random() as we only seed the latter.
* Added corrupt_file, an utility to corrupt files to test chunk
hashing.

* Added "start_tied" option, and don't clear "tied_to_file" when
*_untied are called.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@725 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-19 13:01:24 +00:00
rakshasa f1c9188d55 * Compare the block data downloaded by a non-leader with the current
and mark the block transfer if they do not match.

* Erase handshakes in DownloadMain::stop() rather than
Manager::cleanup_download(). This was causing exceptions in PeerList.

* Add 1000ns to the timeout when polling to avoid rounding errors
messing up scheduling.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@724 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-17 23:46:00 +00:00
rakshasa c95eb62802 * Second part of reworking how multiple downloads of the same chunk is
handled.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@721 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-15 00:46:13 +00:00
rakshasa b3b4acaad8 * Added view of blocks in transfer list view.
* Show chunks with only queued transfers with an underscore in chunks
seen view. Patch by Josef Drexler, public domain.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@719 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-12 22:34:41 +00:00
rakshasa 38f0cdbce2 * Added blocks to transfer list view.
* Minor modifications to the Block API.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@718 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-12 19:20:51 +00:00
rakshasa 1e54882da4 * Reverse the color of currently downloading chunks in chunks
seen. Patch by Josef Drexler, public domain.

* Moving various stuff from Delegator to TransferList.

* Added checks in HandshakeManager::receive_* to check for invalid
handshakes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@716 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-11 18:22:30 +00:00
rakshasa f0d94bc938 * Added TransferList to the API.
* Added transfer list view, bound to the 'u' key.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@715 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-09 22:59:47 +00:00
rakshasa ffb820f536 * Moved PeerConnectionBase::m_downTransfer into RequestList.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@714 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-08 18:45:51 +00:00
rakshasa beeea9fd3e * Handshake was setting wrong bitfield size.
* Cleanup of Block classes.

* Added brackets to error message from the OpenSSL test.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@713 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-06 21:16:55 +00:00
rakshasa d0f6719e50 * Added pageup/down to chunks seen and file list. Patch by Josef
Drexler, all future patches to lib/rtorrent will be under public
domain.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@712 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-04 23:37:39 +00:00
rakshasa 46dd41e956 * Moved defininiton of priority enum to torrent/common.h.
* Properly return the size of the Block.

* Bumped to 0.10.0/0.6.0.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@711 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-04 20:53:04 +00:00
rakshasa 18cd5342df * Moved Delegator over to using the new Block classes.
* Fixed alignment of the ratio display.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@710 e378c898-3ddf-0310-93e7-cc216c733640
2006-06-04 14:17:23 +00:00
rakshasa c573c8a9bc * Starting work on persitant storage of peer info.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@707 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-31 16:05:09 +00:00
rakshasa 146c104eb3 * Added "stop_on_ratio" option and display the ratio. Patch by Josef
Drexler, public domain.

* Made autogen.sh detect glibtoolize.

* Don't resume torrents that are marked as completed yet the initial
hash check returns failed chunks.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@704 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-27 23:35:20 +00:00
rakshasa 932296ce52 * Added "close_low_diskspace" option that closes active downloads on
filesystems with less space left than what was passed as the
argument. Patch by Josef Drexler, public domain.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@703 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-25 19:44:13 +00:00
rakshasa aaaf5d9a5d * core::DownloadList::receive_hash_done(...) now handles failed
initial hash checks properly, rather than throwing an exception.

* Explicitly allocate Bitfield::m_data and dis-associate it from the
size. This will allow us to store m_size and m_set without the
underlying bitfield.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@700 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-23 17:26:38 +00:00
rakshasa e4c5c80688 * Bumping version to 0.9.3/0.5.3.
* Ignore wrong type for "peers" in tracker requests as some trackers
send a dictionary when empty.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@697 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-23 07:36:58 +00:00
rakshasa 770d205b9a * Some views were using uninitialized bool for reversing.
* Possibly hash_done gets called while a download is closed.

* Consider putting chunk release before receive_chunkdone.

* Don't use getopt to check for flags as that re-orders the left-over
arguments.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@696 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-21 00:11:07 +00:00
rakshasa 271e8e6ccf * Bumping the version numbers.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@693 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-19 16:54:42 +00:00
rakshasa 14418244fb * Reordered the ChunkList::sync_* code to work around a gcc-3.3 bug.
* torrent::TrackerList::send_completed() was being called before the
download was resumed, thus it never got sent.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@692 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-18 19:35:27 +00:00
rakshasa ba4a1927ff * Set the hash failed flag before DownloadList::hash_clear closes the
torrent, so the hashing queue doesn't re-open it.

* Randomized the starting position in chunk selector.

* Added man page entry for send/receive buffer size.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@689 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-15 17:55:11 +00:00
rakshasa d4706da4d5 * Removed core::HashQueue, using the "hashing" view and a function in
core::Manager instead.

* Added a new :rtorrent:hashing state so we can distinguish between
initial hashing and manual rehashes. The former is cleared if the
download is paused.

* Added a hash failed flag to core::Download. This is used to skip
entries in the hashing view that either failed to open or are in the
process of being erased from DownloadList.

* torrent::Bitfield::unset was incrementing, rather than decrementing,
the m_set counter.

* Replaced all torrent::internal_error's in rtorrent with
torrent::client_error.

* ^D now checks :rtorrent:state to decide whetever to stop or erase a
download. Downloads queued for hashing will now stop rather than be
deleted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@688 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-13 00:18:50 +00:00
rakshasa 65f3dda9ab * Added 'close_untied' option.
* Remove redundant BitField::update calls now that updating
Bitfield::m_set gets handled properly in hash_resume_load.

* Fixed the error message when trying to lock non-existant session
directories.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@687 e378c898-3ddf-0310-93e7-cc216c733640
2006-05-12 01:07:21 +00:00