Commit Graph

784 Commits

Author SHA1 Message Date
rakshasa e4db1cacc2 * Removed Content and moved stuff to DownloadWrapper and FileList.
* Using a char buffer instead of std::string in
Handshake::prepare_key_plus_pad().


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@813 e378c898-3ddf-0310-93e7-cc216c733640
2006-12-02 09:16:36 +00:00
rakshasa c992fa60df * Moved some stuff from Content into FileList.
* Resume data was not being used as it was comparing the number of
entries with size_bytes, not size_files.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@812 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-30 15:14:26 +00:00
rakshasa 8b759a5c6e * Moved torrent/file*.{cc,h} to torrent/data/.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@811 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-23 13:54:49 +00:00
rakshasa 281f924556 * Set Content::m_chunkSize before adding files.
* Removed the old FileList and replaced it with the cleaned up
EntryList code. The API now gives a FileList* instead of FileList.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@810 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-22 12:57:38 +00:00
rakshasa e3f59ee9e4 * Replaced the old File with the EntryListNode code, and cleaned it
up. The user now uses File* instead of File.

* Changed apply_low_diskspace to use
torrent::Download::free_diskspace() instead of the old file path hack.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@809 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-21 14:05:36 +00:00
rakshasa 4819162ffa * Remove the PeerInfo header dependency inside torrent/data.
* Cleaned up BlockTransfer.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@807 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-19 08:27:20 +00:00
rakshasa f9916b574f * Added a torrent::ClientInfo object to torrent::PeerInfo.
* Removed the old display::ClientInfo code.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@806 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-17 14:50:45 +00:00
rakshasa a5e7acc61b * Added all the clients to the new ClientList and fixed it so that it
prints the version number.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@805 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-16 18:33:45 +00:00
rakshasa cafd4c6090 * Added new API for client type and version info, which will replace
the code currently in the client.

* Fixed rtorrent.rc to show the right name for the encryption option.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@804 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-15 14:05:34 +00:00
rakshasa 1982429b8c * Moving some API headers torrent/data and torrent/peer.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@803 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-08 14:57:30 +00:00
rakshasa 6935c97e8f * Removed some global operator == for HashString, made them explicit.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@802 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-08 11:33:12 +00:00
rakshasa b5cc7cff44 * Check if a file in the torrent is a directory when calling
EntryList::open.

* Removed preload_min_pipelined option and added preload_type, which
disables preload on 0, uses madvise willneed on 1 and does direct
touching of the pages on 2.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@801 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-05 13:38:50 +00:00
rakshasa 0c393e1cdb * Properly nul-terminate the info hash and client id in the tracker
request.

* Implemented options for read-ahead of
chunks. 'preload_min_pipelined', 'preload_min_size' and
'preload_required_rate' are used to decide when to read-ahead a chunk.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@800 e378c898-3ddf-0310-93e7-cc216c733640
2006-11-04 16:05:28 +00:00
rakshasa 9d465de7e1 * Use HashString for hash and id which contains the 20 byte array
directly, instead of using std::string.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@799 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-31 11:20:31 +00:00
rakshasa c9d8a2406d * Added symbol export attributes to the API and made the rest hidden
by default.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@798 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-27 13:07:36 +00:00
rakshasa 5dfc986658 * Allow hex values in the 'tos' option.
* Moved more encryption related code to HandshakeEncryption.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@797 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-25 08:24:20 +00:00
rakshasa 2781ce9698 * Added preliminary support for tunneling peer connections through a
http proxy. Doesn't currently support error checking or such. Use the
'connection_proxy' option to enable.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@796 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-22 10:32:49 +00:00
rakshasa a72054d018 * Removed reset from ProtocolBuffer::consume.
* Added Download::skip_rate that tells us how many downloaded bytes
were skipped.

* Append '&' instead of '?' to the tracker url when the url already
has '?'.

* Added 'tracker_numwant' to the man page and moved tracker related
options to a seperate section.

* Removed Handshake::generate_hash and replaced it with sha1_salt
function in utils/sha1.h.

* Changed various encryption keys to use c_str.

* Set the handshake buffer size to the minimum required and moved them
to the end of Handshake.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@795 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-21 15:13:10 +00:00
rakshasa 44a782e962 * Cleanp of the encryption patch, minor changes.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@793 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-18 07:25:06 +00:00
rakshasa dda5d0783d * Bump version to 0.11.0/0.7.0.
* Shortened the encryption option name to just "encryption".

* Added handshake_encryption.* and moved various stuff from Handshake.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@791 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-15 08:40:29 +00:00
rakshasa 1736c8eaf7 * Encrypted (obfuscated) handshake and connection support. Patch by
Josef Drexler, public domain as per earlier agreement.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@790 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-14 16:46:43 +00:00
rakshasa eb7c0b5874 * Made FileManager::close_least_active() work when cachedTime is
before any of the open file's last touched timer.

* Display upload total, not download for both, in the download info
screen.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@787 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-13 12:59:51 +00:00
rakshasa 29ef815d0e * Added "tracker_numwant" option for setting the numwant field sent to
the tracker.

* Added display for the up/down rate total in download info.

* Use completed bytes from Content for download progress reported to
the tracker, rather than download rate total.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@786 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-11 11:46:33 +00:00
rakshasa 8f311cda47 * Bumping version to 0.10.3/0.6.3.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@783 e378c898-3ddf-0310-93e7-cc216c733640
2006-10-05 12:17:10 +00:00
rakshasa 3084847508 * Bindings::pressed didn't use a temporary to store the result of "itr
!= end()" test.

* Properly clean up trailing '/' in EntryList::set_root_dir(...) and
fixed EntryList::make_directory so it actually makes them.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@776 e378c898-3ddf-0310-93e7-cc216c733640
2006-09-11 13:50:28 +00:00
rakshasa 407824c9c8 * Switch the order rak::advance_bidirectional iterates.
* When testing for mincore, cast the address pointer to (char*).

* Failure during syncing causes the download to stop, unless
flag_ignore_error is set.

* Trigger storage error signal for HashTorrent in
DownloadWrapper::receive_initial_hash.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@774 e378c898-3ddf-0310-93e7-cc216c733640
2006-09-10 03:28:09 +00:00
rakshasa b90a220e15 * Check if individual files are symlinks.
* Use the list of indirect links in EntryList when checking for
available free diskspace.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@773 e378c898-3ddf-0310-93e7-cc216c733640
2006-09-07 14:35:43 +00:00
rakshasa 66dd9a3304 * Use random, not rand, in rak::generate_random as the latter wasn't
being seeded.

* Added a flag to PeerInfo for those that are in handshake, which is
used by PeerList::connect_keep_handshake flag to decide if that
address is to be re-added to the available list when there is already
a connection in progress. This ensures that multiple ports on the same
address don't end up discarded prematurely.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@770 e378c898-3ddf-0310-93e7-cc216c733640
2006-09-01 16:33:21 +00:00
rakshasa af6eb493a9 * Changed RequestList so that it clears m_canceled when a non-canceled
piece is downloaded, and it no longer checks the whole dequeue for
invalid transfers.

* Fixed a bad exception in
PeerConnectionBase::down_chunk_from_buffer(), it is supposed to check
the buffer was used up only when the transfer is unfinished, not when
finished.

* Added --with-address-space to allow the user to change the address
space size. Defaults to 1024 MB on 32 bit, 4096 MB on 64 bit archs.

* Added a parameter to display::Manager::schedule_update that sets the
minimum update interval. Normal updates use 50 msec, adjust_layout
uses 0 msec.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@769 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-31 00:01:12 +00:00
rakshasa ab3a0fead2 * Bumped version number to 0.10.2/0.5.2.
* Support for qwertz keyboard layout.

* Added support for preloading chunks which will be
uploaded. Currently just loads the whole chunk, so it needs to be
improved or disabled before release.

* Added PeerInfo::transfer_counter which keeps track of the number of
BlockTransfers referring to this object.

* Added PeerList::cull_peers that is called every hour to remove
unnessesary PeerInfo from the list..

* In PollKQueue and PollEPoll check that the event we received is
still wanted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@768 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-29 21:41:49 +00:00
rakshasa bb0f13144b * Fixed the man page to include the latest modifications.
* Bound ^F and ^B for navigating and swapped ^P and ^N in some windows
to get correct behavior.

* Sanitized and added PeerInfo and PeerList to the API.

* HashTorrent now waits for the last outstanding chunks finish before
allowing a chunk mapping error to bork the hashing.

* Lowered the default hash_interval to 5 msec and hash_max_tries to 5.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@765 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-24 23:55:33 +00:00
rakshasa a3f7be3278 * Rebound ^P for commands to ^X.
* Map page entry about max_memory_usage and note about units.

* Quick hash checking changes borked the logic for handling FS errors,
etc.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@764 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-22 11:10:11 +00:00
rakshasa 8fe8fbbb31 * Added kqueue support, enable with "--with-kqueue". Currently
keyboard input is disabled due to bugs in MacOSX 10.4.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@763 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-20 22:01:33 +00:00
rakshasa dbfb9f1165 * Fixed leaking of ViewFilters.
* Messed up the patch, now properly sets min/max_peers on incomplete
downloads.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@760 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-16 17:50:24 +00:00
rakshasa 708e89ebad * Fixed memory leaks in Control, ElementMenu and TextElementBranch.
* Check if RLIMIT_AS is present, else use RLIMIT_DATA.

* Don't add one to the timeout in display::Window::mark_dirty() so
that it updates the display immediately upon reorganizing the layout.

* Updated doc/rtorrent.1.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@759 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-15 23:15:47 +00:00
rakshasa ee7016f547 * Show "Hashing:" for torrents that are queued for hashing.
* Allow different min/max peers setting for seeding. Patch by Josef
Drexler.

* Man page entry for "safe_sync" and "max/min_peers_seed".

* The p,o,i,u keys are now bound so they change ElementMenu directly.

* Bound ^P and ^N for moving up/down.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@758 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-15 19:35:43 +00:00
rakshasa 4d988fccb9 * Added TextElementBranch that uses a slot as the conditional.
* Added timeout to WindowText and updated download and peer info.

* Moved default http agent string to rtorrent/configure.ac.

* Periodic syncing of chunks now tries to only sync tightly packed
  ranges of chunks unless timeout_sync has been reached.

* ChunkManager now checks if max memory is set to RLIM_INFINITY, if so
  use 2^32.

* Added safe_sync option that forces MS_SYNC to be used before
  unmapping chunks.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@757 e378c898-3ddf-0310-93e7-cc216c733640
2006-08-13 23:02:13 +00:00
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