


Is kqueue timing borked, hashing uberslow.

Test diskfull without stop_on_ratio.


Long lines don't iterate properly in main screen log.


- Add check to see if all pieces have been downloaded from the same
  peer, if so, increment the failed counter.


Should sync_chunks return how many we could have synced?


Put more weight on known corrupt peers in transferlist.


Add a resume_* for saving peer stuff. Allow filtering of bad
peers. Cull the list of unnessesary entries, like old non-bad peers,
if seed remember other seeders, etc.

Make a union of sockaddr*. 


! Option for adjusting the soft ulimit on max open files.

When finding seeders, mark them as no-want.


---

1) Current connections. A vector of values, if Peer if copyable, or
   pointers if we don't keep any additional info. Probably the former
   as we want to give the user pointers to Peers.

   The user might want to be able to sort this, although it may be
   forfeited if we can find a way to gain quick search with PCB* key.

   We probably want to keep various stuff like iterators for the
   below, non-PCB related data structures, ect. Or make Peer just a
   thin-wrapper to PCB.

2) Available/all(?) addresses, with a pointer to a connection and/or
   host unique data structure.
   
   This must support quick merge of new addresses, quick selection of
   (randomized) unconnected addresses. Probably also the ability to
   look up some of the structs by address.

   The question is, do we keep just unconnected addresses here?

3) Here lives peer info data structure associated with each
   host/group. Here we save bad peers, etc.

   Do we keep a vector of pointers to 1)?

   We don't need to store much perpetually for seeding torrents.

---

Allow for more aggressive freeing of mmaped chunks, so that hashing
doesn't fail.


Is there a problem with NSLU where chunks just don't get unmapped
properly?


If syncing fails, and we try hashing it doesn't actually guarantee it
is synced when we finish?


- Lazy allocation of files.

- Add max file size option.



We're not clearing hash_failed on restart? Should be convert low_diskspace?


Make a TE branch that allows us to change the display of menu entries.

- display ignore_ratio.

consume(size_type v)


- Replace the download message thing by a log that is shown in
  Download view.

- Add a 'possibly corrupt' flag or such, which can be heeded by resume
  save?



- Print some n00b stuff if no .rtorrent.rc file is found?


! Use end for writing to ProtocolBuffer, not position.

! Don't remember incoming address's port, as that is random. Don't
  throw out addresses with incoming connections.

- When syncing, do an available disk space check before the
  sync. Possible after too? Consider keeping the chunks mapped until a
  timeout passes, so we can do safe syncing?

- When a chunk mmap encounters a cannot allocate memory, panic and set
  the memory limit somewhat lower than this.

Fix the hashing so it goes at full speed.


Skip blocking sync when we have lots of space available. Always check
space a while after sync, we still got the sync timer so we know which
were asynced within a certain timeframe. Thus we can know if we
perhaps need to perform hash check.



Properly set the max queue size etc.

Don't trigger hash done when calling hash checked when already done?


Fix the hashing thing so we can pause hash checks.


- In Handshake::prepare_peer_info(), check if peer id already exists?

Move client id stuff into libtorrent?


When receiving connection from the same id/address, check the current
timeout of the previous connection?



The scheduled early borkage:

We're queuing up loading of torrents. So is the problem that we're
triggering the loading of watched torrents too early?

Make sure we don't erase Downloads we've just created, not inserted.



- Is there a way to identify if some files are on the same fs, not
  nessesarily 100%.


Start working on a new tracker class, or settings for syncing etc?


A seperate skipped/overhead rate?


Allow for greater control over tracker messages etc.

Make loading of initial torrents into a queue thingie?


- View::received(..., SLOTS_*) could not find download.


Make more hashing finished stuff generic in recv_hash done? Or
something that can be shared by both recv and done.


Trackers: Add information about failed/success, move slots to
TrackerList.



Assign bad peer info upon success of a chunk with failed pieces?

Use a flag for possibly bad peers?



! Too fast scheduled action borks view.

Make it possible to add events upon various state changes. Use
varibles?


echo | openssl s_client -connect some.server.somewhere:443 | grep -A 100 'BEGIN CERTIFICATE' | grep -B 100 'END CERTIFICATE' >> /usr/share/curl/curl-ca-bundle.crt


***

Filter based on SocketAddress and TrackerInfo? It should be a single
call for both. Modify PeerInfo and make it "persistant"? Would need to
make it lightweight.

Or perhaps outgoing connections use the PeerInfo they make during the
initialization of the handshake.

But it seems it needs to be two-stepped anyway. First to filter purely
on address, second to change settings.


Make a class that holds 'static' information about a download, the
pointer will also be the unique identifier for that download. This
ofcourse assumes that every user of that pointer as id stop using it
once the download is erased.

Check incoming connections.

Move the activity checks out of DownloadManager::find_info.

***

Option for saving session torrents. Allow it to save for all, open,
active or other criteria.


Show seeders?

Make a display update before starting torrents.

Bus error in display.

Check if we properly clear failed downloads.

Socks4 patch, look at it; reply.

Check lag issue.

Consider session directory with empty path. Do we disable when set, etc?

Option to create session and watch directories.

Make selecting the next tracker upon fail explicit.

Proper lazy signal handling.



Note about:

* Schduling rate change.

- Changing priority +/-, man and user guide.

- Date time in schedule.

- Safe to use untied_remove.

- ^O and ^P.



Allow finished torrents to be moved.

Cleanup torrent::Download::set_root_dir

Caught exception: DelegatorPiece dtor called on an object that still has reservees

Add a boolean Variable.

<hnsk> when there's a torrent hashing and another torrent finishes,
would it be possible for it to say waiting for hash check instead of
just inactive

Move set_root_directory cleanup into libtorrent. Allow empty string for "./"?
