Rink Springer <rink@rink.nu> [Sun, 31 Jul 2011 12:34:24 +0200] rev 328
When parsing trackers, revert to the old-style 'announce' URL if 'announce-list' is corrupt
I've seen one torrent which has an empty 'announce-list', causing it to be rejected completely. This may be overly strict, even though the presence of of an empty 'announce-list' should be considered a bug.
I've seen one torrent which has an empty 'announce-list', causing it to be rejected completely. This may be overly strict, even though the presence of of an empty 'announce-list' should be considered a bug.
Rink Springer <rink@rink.nu> [Sun, 31 Jul 2011 12:12:56 +0200] rev 327
Construct the tracker talker before hashing pieces
As constructing the tracker talker may fail (due to missing/corrupt metadata), we must do so before scheduling pieces since an exception will cause our object construction to be aborted - yet the hasher won't know about this and invoke callbacks in an object already gone.
Note that the tracker won't actually be called during initialization (Torrent::heartbeat() talks to it) so this change does not introduce races.
As constructing the tracker talker may fail (due to missing/corrupt metadata), we must do so before scheduling pieces since an exception will cause our object construction to be aborted - yet the hasher won't know about this and invoke callbacks in an object already gone.
Note that the tracker won't actually be called during initialization (Torrent::heartbeat() talks to it) so this change does not introduce races.
Rink Springer <rink@rink.nu> [Fri, 29 Jul 2011 19:19:31 +0200] rev 326
Rework the client so that it caches most of the torrent metadata and queries it less
This still needs work, but this is a nice start
This still needs work, but this is a nice start
Rink Springer <rink@rink.nu> [Fri, 29 Jul 2011 19:18:23 +0200] rev 325
Return a const reference to the torrent name instead of a copy
Rink Springer <rink@rink.nu> [Fri, 29 Jul 2011 19:17:59 +0200] rev 324
Introduce per-torrent user pointers
Users should mostly just derive from the Torrent class, but having an own pointer is easier for now. These are initially NULL so that callbacks can detect whether they aren't being added just yet.
Users should mostly just derive from the Torrent class, but having an own pointer is easier for now. These are initially NULL so that callbacks can detect whether they aren't being added just yet.
Rink Springer <rink@rink.nu> [Fri, 29 Jul 2011 19:15:17 +0200] rev 323
Avoid code duplication by using registerPeer()
Note that this function will now be called before the peer ID is known; this shouldn't be a problem.
Note that this function will now be called before the peer ID is known; this shouldn't be a problem.
Rink Springer <rink@rink.nu> [Fri, 29 Jul 2011 19:13:52 +0200] rev 322
Add a 'torrent added' callback
This is intended to let the client update its administration so that it doesn't have to keep on asking the Overseer for torrent lists.
Do note that callbacks *may* be called before this one is - this mainly happens when hashing is being performed.
This is intended to let the client update its administration so that it doesn't have to keep on asking the Overseer for torrent lists.
Do note that callbacks *may* be called before this one is - this mainly happens when hashing is being performed.
Rink Springer <rink@rink.nu> [Wed, 20 Jul 2011 19:32:35 +0200] rev 321
Use local dummy callbacks when none are provided, and never ever clean them up
This makes it possible to use derrived objects for callbacks
This makes it possible to use derrived objects for callbacks
Rink Springer <rink@rink.nu> [Wed, 20 Jul 2011 19:27:19 +0200] rev 320
Plug a memory leak
Rink Springer <rink@rink.nu> [Wed, 13 Jul 2011 20:26:21 +0200] rev 319
Introduce the Tortilla namespace