]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
8 years agoUpdate package doc
Matt Joiner [Wed, 11 May 2016 11:53:42 +0000 (21:53 +1000)]
Update package doc

In particular, ConfigDir has gone away.

8 years agoGet rid of obsoleted Torrent.ceaseNetworking, and clean up Torrent.closing
Matt Joiner [Wed, 11 May 2016 11:44:55 +0000 (21:44 +1000)]
Get rid of obsoleted Torrent.ceaseNetworking, and clean up Torrent.closing

8 years agoRework Client listeners
Matt Joiner [Wed, 11 May 2016 11:11:52 +0000 (21:11 +1000)]
Rework Client listeners

In particular, if the ListenAddr used a dynamic port ":0", and both TCP and uTP were enabled. If the TCP listen succeeded, and the uTP did not, the TCP listener was leaked, and another port number was not tried.

8 years agoRemove unused Client.pruneTimer
Matt Joiner [Wed, 11 May 2016 11:08:55 +0000 (21:08 +1000)]
Remove unused Client.pruneTimer

8 years agoWasn't using ChunkSize from TorrentSpec
Matt Joiner [Mon, 9 May 2016 13:00:20 +0000 (23:00 +1000)]
Wasn't using ChunkSize from TorrentSpec

8 years agoLock now required around missinggo.Event variables
Matt Joiner [Mon, 9 May 2016 06:44:06 +0000 (16:44 +1000)]
Lock now required around missinggo.Event variables

8 years agoRework setting of info bytes
Matt Joiner [Mon, 9 May 2016 05:47:39 +0000 (15:47 +1000)]
Rework setting of info bytes

8 years agoAdd some comments to file storage
Matt Joiner [Mon, 9 May 2016 05:46:48 +0000 (15:46 +1000)]
Add some comments to file storage

8 years agoAdd Client.AddTorrentInfoHash, and some other tidying
Matt Joiner [Mon, 9 May 2016 04:37:29 +0000 (14:37 +1000)]
Add Client.AddTorrentInfoHash, and some other tidying

Remove Client.bannedTorrents, which shouldn't have been in use anymore. Also fix Client.newTorrent.

8 years agoRemove the vestiges of the expose tracker Client interface
Matt Joiner [Mon, 9 May 2016 02:20:35 +0000 (12:20 +1000)]
Remove the vestiges of the expose tracker Client interface

8 years agodht: Fix race contacting starting addrs in Announce
Matt Joiner [Sat, 7 May 2016 09:02:30 +0000 (19:02 +1000)]
dht: Fix race contacting starting addrs in Announce

8 years agoFix dht.Server.Announce never stopping if the starting addresses can't be contacted
Matt Joiner [Sat, 7 May 2016 08:58:43 +0000 (18:58 +1000)]
Fix dht.Server.Announce never stopping if the starting addresses can't be contacted

8 years agoMove some behaviour into Client.newConnection
Matt Joiner [Sat, 7 May 2016 08:57:38 +0000 (18:57 +1000)]
Move some behaviour into Client.newConnection

8 years agomissinggo.Event changed, connection.writeOptimizer changes
Matt Joiner [Sat, 7 May 2016 08:56:44 +0000 (18:56 +1000)]
missinggo.Event changed, connection.writeOptimizer changes

8 years agotracker: Skip DNS error in UDP test
Matt Joiner [Sat, 7 May 2016 08:17:40 +0000 (18:17 +1000)]
tracker: Skip DNS error in UDP test

8 years agocmd/torrent-infohash update for API changes
Matt Joiner [Fri, 6 May 2016 05:09:59 +0000 (15:09 +1000)]
cmd/torrent-infohash update for API changes

8 years agoRemove the last of the "config dir" stuff
Matt Joiner [Thu, 5 May 2016 13:05:28 +0000 (23:05 +1000)]
Remove the last of the "config dir" stuff

This just conflates the Client. It should be done orthogonally.

8 years agometainfo.InfoEx.Hash becomes a function, UpdateBytes is added, and Bytes used in...
Matt Joiner [Thu, 5 May 2016 12:40:38 +0000 (22:40 +1000)]
metainfo.InfoEx.Hash becomes a function, UpdateBytes is added, and Bytes used in marshalling

Fixes #80.

8 years agometainfo: Add HashBytes
Matt Joiner [Tue, 3 May 2016 11:34:20 +0000 (21:34 +1000)]
metainfo: Add HashBytes

8 years agometainfo: Improve doc
Matt Joiner [Tue, 3 May 2016 11:34:11 +0000 (21:34 +1000)]
metainfo: Improve doc

8 years agometainfo.Info.BuildFromFilePath contained unnecessary log, and didn't handle error...
Matt Joiner [Tue, 3 May 2016 10:25:16 +0000 (20:25 +1000)]
metainfo.Info.BuildFromFilePath contained unnecessary log, and didn't handle error correctly

8 years agocmd/torrent-create: Tidy up flags and remove redundant function calls
Matt Joiner [Tue, 3 May 2016 06:49:30 +0000 (16:49 +1000)]
cmd/torrent-create: Tidy up flags and remove redundant function calls

Issue #80

8 years agoMove a bunch of Torrent methods from client.go
Matt Joiner [Tue, 3 May 2016 06:47:11 +0000 (16:47 +1000)]
Move a bunch of Torrent methods from client.go

8 years agoRework handling of metadata data messages
Matt Joiner [Tue, 3 May 2016 04:59:54 +0000 (14:59 +1000)]
Rework handling of metadata data messages

There are some dubious logs probably resulting from poor ordering of some code for handling incoming metadata data messages.

8 years agoDoc and logging improvements
Matt Joiner [Tue, 3 May 2016 04:58:26 +0000 (14:58 +1000)]
Doc and logging improvements

8 years agocmd/torrent-metainfo-pprint: Add -files flag, and expose NumFiles and TotalLength...
Matt Joiner [Tue, 3 May 2016 02:51:31 +0000 (12:51 +1000)]
cmd/torrent-metainfo-pprint: Add -files flag, and expose NumFiles and TotalLength in output

8 years agoDoc metainfo.Info.BuildFromFilePath
Matt Joiner [Tue, 3 May 2016 02:51:03 +0000 (12:51 +1000)]
Doc metainfo.Info.BuildFromFilePath

8 years agocmd/torrent-metainfo-pprint: Also print InfoHash
Matt Joiner [Mon, 2 May 2016 09:14:49 +0000 (19:14 +1000)]
cmd/torrent-metainfo-pprint: Also print InfoHash

8 years agoAdd metainfo.Hash.FromHexString
Matt Joiner [Mon, 2 May 2016 01:21:03 +0000 (11:21 +1000)]
Add metainfo.Hash.FromHexString

8 years agoRemove metainfo.Builder, and issue #35 test for it
Matt Joiner [Sat, 30 Apr 2016 02:00:12 +0000 (12:00 +1000)]
Remove metainfo.Builder, and issue #35 test for it

Builder is poorly designed, and issue #35 is poorly written. I don't want to support either of them.

8 years agoAllow encoding private=0 in metainfo, which fixes test for not using InfoEx.Bytes...
Matt Joiner [Sat, 30 Apr 2016 01:59:10 +0000 (11:59 +1000)]
Allow encoding private=0 in metainfo, which fixes test for not using InfoEx.Bytes when marshalling as a shortcut

8 years agoAlso fix "context" in reader_test.go
Matt Joiner [Sat, 30 Apr 2016 01:46:45 +0000 (11:46 +1000)]
Also fix "context" in reader_test.go

8 years agoUgh, "context" isn't in go 1.6
Matt Joiner [Sat, 30 Apr 2016 01:33:07 +0000 (11:33 +1000)]
Ugh, "context" isn't in go 1.6

8 years agoAdd Reader.ReadContext
Matt Joiner [Sat, 30 Apr 2016 01:08:29 +0000 (11:08 +1000)]
Add Reader.ReadContext

Allows cancelling reads etc. Torrents that get stuck can result in Reads that won't return until the torrent is dropped.

8 years agoSome changes to metainfo.InfoEx and testutil
Matt Joiner [Sat, 30 Apr 2016 01:07:29 +0000 (11:07 +1000)]
Some changes to metainfo.InfoEx and testutil

8 years agoFix crash when peers have sent undersized bitfields and we get the torrent info
Matt Joiner [Fri, 29 Apr 2016 18:08:02 +0000 (04:08 +1000)]
Fix crash when peers have sent undersized bitfields and we get the torrent info

8 years agoChange the behaviour of Torrent.Length with when info isn't available
Matt Joiner [Wed, 20 Apr 2016 10:10:39 +0000 (20:10 +1000)]
Change the behaviour of Torrent.Length with when info isn't available

8 years agoImprove some docs
Matt Joiner [Wed, 20 Apr 2016 10:10:10 +0000 (20:10 +1000)]
Improve some docs

8 years agoFix receiver pointeriness for some File methods
Matt Joiner [Tue, 19 Apr 2016 07:20:31 +0000 (17:20 +1000)]
Fix receiver pointeriness for some File methods

8 years agocmd/torrent: Add -addr flag back in
Matt Joiner [Tue, 19 Apr 2016 07:20:14 +0000 (17:20 +1000)]
cmd/torrent: Add -addr flag back in

8 years agoMerge pull request #79 from shoenig/normalize
Matt Joiner [Tue, 19 Apr 2016 07:10:42 +0000 (17:10 +1000)]
Merge pull request #79 from shoenig/normalize

refactor struct identifiers to follow conventional go names

8 years agorefactor struct identifiers to follow conventional go names
Seth Hoenig [Tue, 19 Apr 2016 04:11:11 +0000 (23:11 -0500)]
refactor struct identifiers to follow conventional go names

8 years agoImprove doc on Torrent.Drop
Matt Joiner [Mon, 18 Apr 2016 11:52:30 +0000 (21:52 +1000)]
Improve doc on Torrent.Drop

https://github.com/anacrolix/torrent/issues/73

8 years agocmd/torrent: Forget trying to expose the entire Client config struct to the command...
Matt Joiner [Mon, 18 Apr 2016 11:30:28 +0000 (21:30 +1000)]
cmd/torrent: Forget trying to expose the entire Client config struct to the command-line

8 years agocmd/torrent: Remove redundant _ "net/http/pprof" import
Matt Joiner [Mon, 18 Apr 2016 11:29:37 +0000 (21:29 +1000)]
cmd/torrent: Remove redundant _ "net/http/pprof" import

It's done by envpprof instead

8 years agopiece-file storage: Use the receiver-local FileStore field
Matt Joiner [Thu, 14 Apr 2016 07:28:30 +0000 (17:28 +1000)]
piece-file storage: Use the receiver-local FileStore field

Because aliens, mainly.

8 years agoMerge all our global consts and vars into global.go
Matt Joiner [Thu, 14 Apr 2016 07:19:07 +0000 (17:19 +1000)]
Merge all our global consts and vars into global.go

For easier referral to other parties.

8 years agoComments and logs around bad metadata size
Matt Joiner [Thu, 7 Apr 2016 09:13:51 +0000 (19:13 +1000)]
Comments and logs around bad metadata size

8 years agoFix possible deadlock
Matt Joiner [Mon, 4 Apr 2016 10:39:57 +0000 (20:39 +1000)]
Fix possible deadlock

8 years agoFix Config.IPBlocklist type
Matt Joiner [Mon, 4 Apr 2016 06:23:30 +0000 (16:23 +1000)]
Fix Config.IPBlocklist type

8 years agoiplist: Add helper to mmap in a packed blocklist
Matt Joiner [Mon, 4 Apr 2016 06:23:05 +0000 (16:23 +1000)]
iplist: Add helper to mmap in a packed blocklist

8 years agoApply ineffassign linter
Matt Joiner [Mon, 4 Apr 2016 05:39:26 +0000 (15:39 +1000)]
Apply ineffassign linter

8 years agoApply unconvert linter
Matt Joiner [Mon, 4 Apr 2016 05:28:25 +0000 (15:28 +1000)]
Apply unconvert linter

8 years agoRemove more deadcode
Matt Joiner [Mon, 4 Apr 2016 05:23:05 +0000 (15:23 +1000)]
Remove more deadcode

8 years agoRemove deadcode
Matt Joiner [Mon, 4 Apr 2016 05:18:51 +0000 (15:18 +1000)]
Remove deadcode

8 years agoRemove unused orderedList
Matt Joiner [Mon, 4 Apr 2016 05:10:39 +0000 (15:10 +1000)]
Remove unused orderedList

8 years agoRemove some of the magic ConfigDir stuff
Matt Joiner [Mon, 4 Apr 2016 04:04:48 +0000 (14:04 +1000)]
Remove some of the magic ConfigDir stuff

This might become a helper. Torrent file cache still remains.

8 years agoMove Magnet and friends into metainfo package
Matt Joiner [Mon, 4 Apr 2016 03:48:39 +0000 (13:48 +1000)]
Move Magnet and friends into metainfo package

8 years agoMerge pull request #72 from shoenig/magnetize
Matt Joiner [Mon, 4 Apr 2016 03:20:15 +0000 (13:20 +1000)]
Merge pull request #72 from shoenig/magnetize

convenience function for creating magnets

8 years agoUse metainfo.Hash for piece and info hashes
Matt Joiner [Mon, 4 Apr 2016 03:01:31 +0000 (13:01 +1000)]
Use metainfo.Hash for piece and info hashes

8 years agoconvenience function for creating magnets
Seth Hoenig [Sun, 3 Apr 2016 13:51:46 +0000 (08:51 -0500)]
convenience function for creating magnets

8 years agoAdding a torrent without info after waitAccept has blocked wouldn't trigger further...
Matt Joiner [Sun, 3 Apr 2016 12:06:25 +0000 (22:06 +1000)]
Adding a torrent without info after waitAccept has blocked wouldn't trigger further accepts immediately

8 years agoFix deadlocks in WriteStatus due to incomplete renaming
Matt Joiner [Sun, 3 Apr 2016 10:54:14 +0000 (20:54 +1000)]
Fix deadlocks in WriteStatus due to incomplete renaming

8 years agoMerge Torrent and torrent types
Matt Joiner [Sun, 3 Apr 2016 08:40:43 +0000 (18:40 +1000)]
Merge Torrent and torrent types

8 years agoComments
Matt Joiner [Sun, 3 Apr 2016 06:52:52 +0000 (16:52 +1000)]
Comments

8 years agoMake everything on type torrent private
Matt Joiner [Sun, 3 Apr 2016 06:50:53 +0000 (16:50 +1000)]
Make everything on type torrent private

8 years agopiece file storage: Don't write to completed pieces
Matt Joiner [Sun, 3 Apr 2016 06:37:50 +0000 (16:37 +1000)]
piece file storage: Don't write to completed pieces

8 years agocmd/torrent-metainfo-pprint: Switch to tagflag for argument parsing
Matt Joiner [Sun, 3 Apr 2016 06:37:17 +0000 (16:37 +1000)]
cmd/torrent-metainfo-pprint: Switch to tagflag for argument parsing

8 years agoIf we fail to write to a piece, check its completion state
Matt Joiner [Sun, 3 Apr 2016 06:36:57 +0000 (16:36 +1000)]
If we fail to write to a piece, check its completion state

8 years agoImprove log messages
Matt Joiner [Sun, 3 Apr 2016 06:36:24 +0000 (16:36 +1000)]
Improve log messages

8 years agoSuppress piece read errors when data is obtained
Matt Joiner [Sun, 3 Apr 2016 06:35:28 +0000 (16:35 +1000)]
Suppress piece read errors when data is obtained

8 years agostorage: Don't read bad completed piece files
Matt Joiner [Sun, 3 Apr 2016 06:33:31 +0000 (16:33 +1000)]
storage: Don't read bad completed piece files

8 years agostorage: Fix io.EOF on short piece files
Matt Joiner [Sat, 2 Apr 2016 05:57:22 +0000 (16:57 +1100)]
storage: Fix io.EOF on short piece files

8 years agoMissing error checks in test
Matt Joiner [Wed, 30 Mar 2016 08:16:40 +0000 (19:16 +1100)]
Missing error checks in test

8 years agoSuppress logging noise in tests
Matt Joiner [Wed, 30 Mar 2016 08:12:57 +0000 (19:12 +1100)]
Suppress logging noise in tests

8 years agoMove storage.FileStore interface to missinggo
Matt Joiner [Wed, 30 Mar 2016 08:12:33 +0000 (19:12 +1100)]
Move storage.FileStore interface to missinggo

8 years agoFix missinggo import
Matt Joiner [Wed, 30 Mar 2016 08:11:55 +0000 (19:11 +1100)]
Fix missinggo import

8 years agoFew fixes for downstream projects
Matt Joiner [Tue, 29 Mar 2016 01:13:03 +0000 (12:13 +1100)]
Few fixes for downstream projects

8 years agoRemove all the old data store packages
Matt Joiner [Tue, 29 Mar 2016 00:14:54 +0000 (11:14 +1100)]
Remove all the old data store packages

8 years agoReimplement piece storage
Matt Joiner [Tue, 29 Mar 2016 00:14:34 +0000 (11:14 +1100)]
Reimplement piece storage

8 years agoFinish fixing tests
Matt Joiner [Mon, 28 Mar 2016 13:24:00 +0000 (00:24 +1100)]
Finish fixing tests

8 years agoMake opening a torrent in storage an explicit method
Matt Joiner [Mon, 28 Mar 2016 11:40:29 +0000 (22:40 +1100)]
Make opening a torrent in storage an explicit method

This is storage types where opening can fail, like mmap

8 years agoGet mmap storage working
Matt Joiner [Mon, 28 Mar 2016 10:57:04 +0000 (21:57 +1100)]
Get mmap storage working

8 years agoNew storage interface
Matt Joiner [Mon, 28 Mar 2016 09:38:30 +0000 (20:38 +1100)]
New storage interface

8 years agodata/file: Rewrite ReadAt
Matt Joiner [Sat, 26 Mar 2016 09:45:31 +0000 (20:45 +1100)]
data/file: Rewrite ReadAt

8 years agodata/file: Add a test checking for io.ErrUnexpectedEOF on short read
Matt Joiner [Sat, 26 Mar 2016 07:30:30 +0000 (18:30 +1100)]
data/file: Add a test checking for io.ErrUnexpectedEOF on short read

8 years agoImprove doc comments on Data
Matt Joiner [Sat, 26 Mar 2016 07:27:28 +0000 (18:27 +1100)]
Improve doc comments on Data

8 years agoTidy up a test that fails with the wrong reasons
Matt Joiner [Thu, 24 Mar 2016 12:52:38 +0000 (23:52 +1100)]
Tidy up a test that fails with the wrong reasons

8 years agoTidy up bytesLeft calculations
Matt Joiner [Tue, 22 Mar 2016 02:11:36 +0000 (13:11 +1100)]
Tidy up bytesLeft calculations

This should fix a bug where completion is shown as negative in WriteStatus

8 years agoLog connection errors when debug mode
Matt Joiner [Tue, 22 Mar 2016 02:10:18 +0000 (13:10 +1100)]
Log connection errors when debug mode

8 years agoAdd a test for bad have messages
Matt Joiner [Tue, 22 Mar 2016 02:09:02 +0000 (13:09 +1100)]
Add a test for bad have messages

The reason for the cleanup to peer have-related messages in the first place.

8 years agoTidy up the peer have{,all,none},bitfield handling
Matt Joiner [Tue, 22 Mar 2016 01:07:03 +0000 (12:07 +1100)]
Tidy up the peer have{,all,none},bitfield handling

8 years agoAdd t.bytesLeftAnnounce
Matt Joiner [Mon, 21 Mar 2016 22:06:48 +0000 (09:06 +1100)]
Add t.bytesLeftAnnounce

Now it's safe to remove tracker specific bytesLeft contract

8 years agoClient.WriteStatus: Raise the precision of the completion percentage
Matt Joiner [Mon, 21 Mar 2016 21:33:08 +0000 (08:33 +1100)]
Client.WriteStatus: Raise the precision of the completion percentage

8 years agoUse missinggo.AddrPort directly
Matt Joiner [Mon, 21 Mar 2016 05:02:36 +0000 (16:02 +1100)]
Use missinggo.AddrPort directly

8 years agoMake peerGotPiece a method on connection
Matt Joiner [Mon, 21 Mar 2016 03:19:51 +0000 (14:19 +1100)]
Make peerGotPiece a method on connection

8 years agoMove peerGotPiece
Matt Joiner [Mon, 21 Mar 2016 03:17:15 +0000 (14:17 +1100)]
Move peerGotPiece

8 years agoAdd some File method comments
Matt Joiner [Sat, 19 Mar 2016 06:40:30 +0000 (17:40 +1100)]
Add some File method comments

8 years agoFavour earlier pieces slightly, helps with in-order downloads
Matt Joiner [Sat, 19 Mar 2016 06:40:18 +0000 (17:40 +1100)]
Favour earlier pieces slightly, helps with in-order downloads

8 years agoFix locks on Reader.SetReadahead
Matt Joiner [Sat, 19 Mar 2016 06:39:56 +0000 (17:39 +1100)]
Fix locks on Reader.SetReadahead