* Work-around for OpenBSD's broken sys/event.h, which fails to compile
if it's the first (or only) included header. (Ticket #1470)

* Fixes compilation with old libcurl versions. (Ticket #1471)

* Fix compile error on systems that lack mincore(2).

* Fixes a crash in epoll due to libcurl/c-ares bug:
PollEPoll::modify(...) epoll_ctl call failed.

* Enforce an http transfer timeout when libcurl fails to honor
it. Also set a 5-minute timeout for (previously unlimited) torrent
transfers and fixes the argument type for curl_easy_setopt values.

* Allows bandwidth throttles to work without floating point support.

* Added the 'd.add_peer=host[:port]' command to manually add a peer
(not for torrents marked "private"), port 6881 is the default.

* Allows banning the selected peer with "B". No unbanning is possible
yet.

All the above patches were written by Josef Drexler.


* Added system.method.{insert,erase} commands that allows
user-specified commands. E.g "system.method.insert=foo,print=Bar".

* Differentiate between commands that have no target, and those that
take generic targets, when using XMLRPC.

* Added 'event.download.inserted_{new,session}' that are triggered
when a new or a session torrent is added. Ticket #1516.

* Added 'system.method.get', 'ui.current_view.set' and 'group.insert'
commands.

* Enabled different ratio settings for different groups of
downloads.

* Added 'view.persistance' command that makes downloads inserted into
that view persist across sessions. Only call on user-created views.

* Added 'ratio.*' commands that call the 'group.seeding.ratio.*'
equivalents.

* Changed torrent::DownloadList::close_directly() so doesn't save the
session if the underlying file/directory has been moved or
removed. This change, in addition to calling 'd.set_directory=' before
'execute=mv,...', as previously shown in the examples, will make
rtorrent behave correctly when 'check_hash=no' is set.



- Add ratio handling page to the release notes. Also, method.set_key
  and d.set_directory.



- Firmware update for kamera.

- Laanekassen, mona.




sakura
ueno
harajuku




- Create the pre-parsed commands at the same time as the new syntax.

- Use a flag to mark erased commands, rather than removing them from
  the map, as that would make it impossible to support storing of
  iterators.

- Placement new/delete in Object.




--- User-Defined commands ---

  Allow for optimizing by pre-parseing and possibly using
  placement-new to keep locality.



--- Start work on a new command thing ---

* For now, differenciate by starting with a pre-determined char.

* It should support ranges, and/or stop on \0. (End range as a NULL pointer just keep us going until we hit that char)

* Consider if new-line, etc, should have any meaning.

* Either use foo_function(arg1, arg2, ...), or {foo_function, arg1, arg2}.


* Detect when dropping offline, getting online, fully/partially
  utilizing network bandwidth.


* Add a timer so that we pace our http requests instead of flooding
  all our available slots at the same time.



--- Change ---

# Only check the filename cache for loading tied torrents (e.g. from watch dirs) but not
# manually loaded ones via <enter>/<bs>, to allow loading those again (ticket #1227).


POST: race shuttle taking control of global markets

* Start reviewing patches.


_bear397!


d.multicall main p.multicall=,p.get_address=


<josef> rakshasa: I've now noticed the same problem from ticket #1302. Downloading a torrent with a fast server as peer and various other slower peers. The fast peer was idle most of the time, only every few seconds did rtorrent request pieces and received them instantly.


- Update a timestamp for upload/download activity. This would be used
  in the download scheduler.


- A bug caused by trying to download a torrent, not getting any peers
  so it only makes the zero-length files, then restarting the
  client. Should require ^E to continue.


- Add a rudementary max downloads thing, make it separate seeding and
  leeching.


- Insert active torrents in to active.

- Move DL event inserts into the new commands thing?


FileList::set_root_dir(const std::string& path) ?????


ChunkList::get(size_type index, bool writable) <- Figure out how to
make it work with hash checking when you can't open the files... The
error code hack probably isn't right.

// Missing file, skip the hash check. <- this should skip all chunks
touched by that file.


- Make the command_map_data_type typedef's use a common template parameter.


=== Design notes for multi-layered torrent state control ===

The queue shares some common characteristics with the hash-queue. Yet
we probably can't put them togheter as hashing and being in the queue
are separate states.

We also need to support multiple queues. This means we can implement
'forced' and 'disabled' as two queues. Stopping/starting a torrent
would now then involve adding it to the appropriate queue, which would
put in motion the DL related actions.

But how would this relate to the download commands? Well, to allow the
queues to be as scriptable as possible, we'd need to keep the DL
related commands as-is. We'd also add a download command for moving it
to a new queue, and make a couple of helper functions.

===

- Make active and similar views internal, and keep just a copy for
  external consumption.

===

- Look at the current View thing and whether you need to add support
  for commands on insert/erase/stuff, and possibly improve the current
  code so updates can be done efficiently. Kinda like subscribing to
  events, thus insert and removal from current queues will be much
  more efficient.

{

- Add a command the cleans up strings for proper sorting.


- Make filter_on call repeatedly with a single string, rather than
  accepting a list.


- Do we need to build up command 'chains' now?


- Consider the need to make the views guaranteed large enough for
  inserts, so that if we iterate through a View doing actions on stuff
  it will remain safe?

- Do we want to keep the current design of a vector holding all
  downloads? This does make it better at handling
  insert/remove/filter, but worse at dealing with large sets.

}


! Once the Views are up to snuff, create the started and stopped
  queues and migrate the current code.

{

* Change start/stop functions into moving in/out of the Views. Events
  to those views.

- Make the start/stop functions into commands.

- Make command slot that wraps commands.

- DownloadList::close_quick(Download* download) <- next up.


! Remove the extra CommandSlot<void> thing, an internal template
  struct or just make void functions hide the parameter?


}



- Make upload/download slots work on the heuristics of the scheudlers.


- Add XMLRPC version information?


- Add proper (and non-blocking) fallocate support. This also needs to
  check how much space is left. The interface needs to allow us to say
  if we want to do blocking or non-blocking allocate, etc.

  Allocate should probably be called when we first try to write
  something to a file.



- Add a 'tweaking upload/download slots' guide.


- Trim ending / in filenames? Look closer at this... It seems we're
  not validating the path elements properly. E.g path and name in
  different encodings. Should we move this closer to the place it is
  used, like when we freeze the paths? That would make sure we catch
  weird loopholes, though might want to check the torrent data on load
  to make sure we don't let scripts read bad paths.


- Fix the 'mtime' not being updated when just moving a file into a dir thing.

- Move SACompact somewhere sane.



=== Pass the target_type thing to all the CommandSlot<...> functions ===

- Remove CommandSlot<void> specialisation and use an in-class template
struct to define the right type. That struct will also wrap the call
to the slot, thus allowing reuse of the same code.

- Figure out how to move over to using only target_type's from
CommandMap.

---


design of everyday things


#1243 - Check if write failure doesn't get properly detected.


- Write a note about {} now being sensetive to whitespace, etc.

- To make the { syntax proper, it needs to read the contents directly to a list of lists of commands+args.


<josef> rtorrent: priority_queue_insert(...) received a bad timer.
<josef> reproducible when I force a hash check on a torrent with nothing downloaded


<josef> but now I got TrackerList::receive_failed(...) called but the iterator is invalid."

<josef> rakshasa: it'd be nice to have something like import_nothrow that logs errors and continues instead of aborting like try_import


http://libtorrent.rakshasa.no/ticket/1213



- Change key presses in element_download_list.cc to commands.

- Fix view_set. This involves adding a map of views, check also iterator sanity.


- Consider if the mtime resolution is enough to avoid race conditions
  on the prune cache.



ElementDownloadList::ElementDownloadList() - FIXME

- Add the 'set queue_create/resize' flags.


- directory_entry::is_file() const { return true; }



- Make Pool lazily created.


- Fix the api for allocating sockets. Make this a helper function or something?

- The global up/down slot limit only gets set after throttle is updated...

- Global up/down for high speeds is insane... Also, move these into
  libtorrent helper functions.

- The download slot limit doesn't work properly when we try to limit
  the amount of memory being limited, as it will accept downloading.

- Extend Object to support floats?

- Look into the problem of transfers during (inital) hash check. Could
  we perhaps allow pausing things while checking?

- Add option to save resume data on session auto save.


- Unallocate blocks that are in peers that haven't transfered data in
  a couple ticks.





--- API redesign ---

- Refactor the Download class. This should probably merge Download and
  DownloadWrapper.

- Create a download list class.

- Remove Download::set_connection_type.

- Move stuff into a global torrent object.

- Change Peer to PeerConnection.


---

<josef> or the bug with pieces getting stuck in the transfer list after we receive a choke
<josef> I had no patch for that, you just need to call download_queue()->cancel() twice in PCL::read_message

Seems the RequestList::cancel thing is kinda bad, as it does both 'cancel queued' and 'clear canceled'.


- Add support for diffs to torrents and saved infohash, so we improve shutdown time.