]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
6 years agoUse go-libutp if cgo is enabled
Matt Joiner [Fri, 16 Jun 2017 08:08:24 +0000 (18:08 +1000)]
Use go-libutp if cgo is enabled

6 years agometainfo URL list can be a string or list
Matt Joiner [Fri, 16 Jun 2017 07:07:30 +0000 (17:07 +1000)]
metainfo URL list can be a string or list

6 years agoiplist: Add TODO to allow unmapping
Matt Joiner [Sun, 11 Jun 2017 10:09:40 +0000 (20:09 +1000)]
iplist: Add TODO to allow unmapping

6 years agoMerge pull request #161 from mlmhl/event
Matt Joiner [Mon, 5 Jun 2017 10:47:58 +0000 (20:47 +1000)]
Merge pull request #161 from mlmhl/event

signal an event when torrent closed

6 years agosignal an event when torrent closed
mlmhl [Sat, 3 Jun 2017 08:42:40 +0000 (16:42 +0800)]
signal an event when torrent closed

7 years agoMerge pull request #159 from elgatito/helpers_add
Matt Joiner [Fri, 2 Jun 2017 07:04:01 +0000 (17:04 +1000)]
Merge pull request #159 from elgatito/helpers_add

added few helper functions

7 years agoadded few helper functions: t.PieceBytesMissing, r.CurrentPos, r.SetNonResponsive
Denis Kuzmenok [Fri, 2 Jun 2017 04:46:28 +0000 (07:46 +0300)]
added few helper functions: t.PieceBytesMissing, r.CurrentPos, r.SetNonResponsive

7 years agoClose implicit Client default storage on Client.Close
Matt Joiner [Thu, 1 Jun 2017 12:57:08 +0000 (22:57 +1000)]
Close implicit Client default storage on Client.Close

Fixes #158

7 years agoSkip on fusermount failure
Matt Joiner [Thu, 1 Jun 2017 05:39:44 +0000 (15:39 +1000)]
Skip on fusermount failure

7 years agoMake bolt completion DB directory if necessary
Matt Joiner [Thu, 1 Jun 2017 01:20:50 +0000 (11:20 +1000)]
Make bolt completion DB directory if necessary

7 years agoTighten FUSE test skipping
Matt Joiner [Thu, 1 Jun 2017 01:19:45 +0000 (11:19 +1000)]
Tighten FUSE test skipping

7 years agoTidy up the duplicate conn selection code
Matt Joiner [Fri, 26 May 2017 03:00:20 +0000 (13:00 +1000)]
Tidy up the duplicate conn selection code

7 years agoMove File.State lock to top of function
Matt Joiner [Fri, 26 May 2017 02:59:52 +0000 (12:59 +1000)]
Move File.State lock to top of function

7 years agoperf.Timer.Stop renamed
Matt Joiner [Fri, 26 May 2017 02:58:23 +0000 (12:58 +1000)]
perf.Timer.Stop renamed

7 years agoMerge pull request #156 from mlmhl/completion
Matt Joiner [Thu, 25 May 2017 06:39:03 +0000 (16:39 +1000)]
Merge pull request #156 from mlmhl/completion

make completion configurable

7 years agomake pieceCompletion configurable
mlmhl [Mon, 22 May 2017 02:15:48 +0000 (10:15 +0800)]
make pieceCompletion configurable

7 years agoMerge pull request #154 from mlmhl/connection
Matt Joiner [Wed, 17 May 2017 09:22:14 +0000 (19:22 +1000)]
Merge pull request #154 from mlmhl/connection

bug fix: race condition between outgoing connection and incoming conn…

7 years agobug fix: race condition between outgoing connection and incoming connection
luffyma(马林) [Wed, 10 May 2017 03:04:31 +0000 (11:04 +0800)]
bug fix: race condition between outgoing connection and incoming connection

7 years agoMerge pull request #153 from joelanford/master
Matt Joiner [Tue, 25 Apr 2017 00:39:44 +0000 (10:39 +1000)]
Merge pull request #153 from joelanford/master

Add public methods for torrent peer counts

7 years agoAdded peer count stats to TorrentStats struct
Joe Lanford [Thu, 20 Apr 2017 20:19:58 +0000 (16:19 -0400)]
Added peer count stats to TorrentStats struct

7 years agoAvoid allocating skeys for receiving encrypted handshakes
Matt Joiner [Tue, 4 Apr 2017 08:41:08 +0000 (18:41 +1000)]
Avoid allocating skeys for receiving encrypted handshakes

7 years agostorage: Fix race condition in mapPieceCompletion
Matt Joiner [Thu, 30 Mar 2017 10:38:44 +0000 (21:38 +1100)]
storage: Fix race condition in mapPieceCompletion

7 years agosortimports
Matt Joiner [Sun, 19 Mar 2017 06:04:32 +0000 (17:04 +1100)]
sortimports

7 years agostorage: Add package doc
Matt Joiner [Sat, 18 Mar 2017 02:03:02 +0000 (13:03 +1100)]
storage: Add package doc

7 years agoMerge pull request #149 from thechriswalker/torrent-storage-options
Matt Joiner [Fri, 17 Mar 2017 10:30:28 +0000 (21:30 +1100)]
Merge pull request #149 from thechriswalker/torrent-storage-options

fix `Spec.Storage` and allow per-torrent dir

7 years agofix `Spec.Storage` and allow per-torrent dir
Chris Walker [Thu, 16 Mar 2017 14:24:54 +0000 (14:24 +0000)]
fix `Spec.Storage` and allow per-torrent dir

`TorrentSpec.Storage` was not honored when calling `Client.AddTorrentSpec`
and the configured `cfg.DefaultStorage` was always used. Now if you construct
your `TorrentSpec` you can specify any `StorageImpl`

Also, the most common use case for custom storage being per-torrent paths for
FileStorage, this adds a `pathMaker` function to the File implementation that
allows customization, along with the default (always use base path) and my use
case (which seemed common enough from the Gitter chat) which is infohash based
subdirectories.

All Public methods have not changed signature, but 1 private method did, hence
the test update.

7 years agoFix a logging of metainfo.Hash
Matt Joiner [Fri, 24 Feb 2017 10:56:23 +0000 (21:56 +1100)]
Fix a logging of metainfo.Hash

7 years agoDon’t track the empty string, and ditch Torrent.announceList
Matt Joiner [Sun, 19 Feb 2017 04:57:30 +0000 (15:57 +1100)]
Don’t track the empty string, and ditch Torrent.announceList

7 years agoFix torrent status info hash hex
Matt Joiner [Thu, 16 Feb 2017 09:10:32 +0000 (20:10 +1100)]
Fix torrent status info hash hex

7 years agometainfo: Improve MetaInfo.AnnounceList handling
Matt Joiner [Wed, 15 Feb 2017 09:05:28 +0000 (20:05 +1100)]
metainfo: Improve MetaInfo.AnnounceList handling

7 years agoRevert "Quick fix for missing MetaInfo.Announce everywhere with trackers"
Matt Joiner [Wed, 15 Feb 2017 07:40:30 +0000 (18:40 +1100)]
Revert "Quick fix for missing MetaInfo.Announce everywhere with trackers"

This reverts commit b7a8d08bbf046d756e8d80744a188167e28a19de.

7 years agoUpdate README.md
Matt Joiner [Tue, 14 Feb 2017 11:42:21 +0000 (22:42 +1100)]
Update README.md

Add CircleCI shield

7 years agoQuick fix for missing MetaInfo.Announce everywhere with trackers
Matt Joiner [Mon, 13 Feb 2017 11:28:42 +0000 (22:28 +1100)]
Quick fix for missing MetaInfo.Announce everywhere with trackers

7 years agodht.Server.Announce now takes [20]byte
Matt Joiner [Tue, 7 Feb 2017 04:01:02 +0000 (15:01 +1100)]
dht.Server.Announce now takes [20]byte

7 years agoTrivial logging, comment, Stringer changes
Matt Joiner [Thu, 2 Feb 2017 05:53:19 +0000 (16:53 +1100)]
Trivial logging, comment, Stringer changes

7 years agoMassively reduce CPU when Readers are blocked on unavailable data
Matt Joiner [Wed, 1 Feb 2017 05:28:16 +0000 (16:28 +1100)]
Massively reduce CPU when Readers are blocked on unavailable data

7 years agoChange type of metainfo.Info.URLList
Matt Joiner [Wed, 18 Jan 2017 01:10:13 +0000 (12:10 +1100)]
Change type of metainfo.Info.URLList

7 years agoTODO
Matt Joiner [Wed, 18 Jan 2017 01:09:51 +0000 (12:09 +1100)]
TODO

7 years agopackage itertools API changed
Matt Joiner [Sat, 14 Jan 2017 09:39:48 +0000 (20:39 +1100)]
package itertools API changed

7 years agoUpdate README
Matt Joiner [Thu, 12 Jan 2017 10:50:01 +0000 (21:50 +1100)]
Update README

7 years agoRemove FileStorePieces storage backend
Matt Joiner [Thu, 5 Jan 2017 06:00:59 +0000 (17:00 +1100)]
Remove FileStorePieces storage backend

ResourcePIeces is now preferred.

7 years agosortimports
Matt Joiner [Thu, 5 Jan 2017 06:00:16 +0000 (17:00 +1100)]
sortimports

7 years agoLog the storage TorrentImpl type
Matt Joiner [Wed, 4 Jan 2017 07:15:49 +0000 (18:15 +1100)]
Log the storage TorrentImpl type

7 years agoShow connection piece request order in text status
Matt Joiner [Wed, 4 Jan 2017 07:09:50 +0000 (18:09 +1100)]
Show connection piece request order in text status

7 years agometainfo: FileInfo.Offset failed with single-file torrents
Matt Joiner [Wed, 4 Jan 2017 07:09:17 +0000 (18:09 +1100)]
metainfo: FileInfo.Offset failed with single-file torrents

7 years agoReduce the priority given to earlier pieces. Maximum priority reads at the end of...
Matt Joiner [Wed, 4 Jan 2017 07:08:29 +0000 (18:08 +1100)]
Reduce the priority given to earlier pieces. Maximum priority reads at the end of the file aren’t getting enough attention.

7 years agometainfo: Add helper methods to FileInfo
Matt Joiner [Wed, 4 Jan 2017 06:15:11 +0000 (17:15 +1100)]
metainfo: Add helper methods to FileInfo

7 years agoMerge pull request #144 from BonkaBonka/fastfail
Matt Joiner [Wed, 4 Jan 2017 03:42:59 +0000 (14:42 +1100)]
Merge pull request #144 from BonkaBonka/fastfail

Abort verify at first hash mismatch.

7 years agoAbort verify at first hash mismatch.
BonkaBonka [Wed, 4 Jan 2017 02:44:19 +0000 (21:44 -0500)]
Abort verify at first hash mismatch.

7 years agoRemove unused funcs and idents
Matt Joiner [Sun, 1 Jan 2017 00:03:02 +0000 (11:03 +1100)]
Remove unused funcs and idents

7 years agoMove method queuePieceCheck
Matt Joiner [Sun, 1 Jan 2017 00:02:37 +0000 (11:02 +1100)]
Move method queuePieceCheck

7 years agosort imports
Matt Joiner [Sun, 1 Jan 2017 00:01:41 +0000 (11:01 +1100)]
sort imports

7 years agoPanic if NewHashFromHex gets a bad string
Matt Joiner [Sat, 31 Dec 2016 23:07:05 +0000 (10:07 +1100)]
Panic if NewHashFromHex gets a bad string

7 years agoRewrite cmd/torrent-verify
Matt Joiner [Sat, 31 Dec 2016 23:05:41 +0000 (10:05 +1100)]
Rewrite cmd/torrent-verify

Fixes #141

7 years agoUpdate README.md
Matt Joiner [Sat, 31 Dec 2016 08:17:00 +0000 (19:17 +1100)]
Update README.md

Add Trickl android app

7 years agoUpdate README.md
Matt Joiner [Sat, 31 Dec 2016 08:07:02 +0000 (19:07 +1100)]
Update README.md

Closes #143

7 years agodht/… moved to github.com/anacrolix/dht
Matt Joiner [Wed, 14 Dec 2016 00:43:37 +0000 (11:43 +1100)]
dht/… moved to github.com/anacrolix/dht

7 years agoRename dht/krpc.KRPCError -> Error
Matt Joiner [Tue, 13 Dec 2016 03:50:42 +0000 (14:50 +1100)]
Rename dht/krpc.KRPCError -> Error

7 years agodht: Reply with Method Unknown error to unknown query methods received
Matt Joiner [Tue, 13 Dec 2016 03:45:40 +0000 (14:45 +1100)]
dht: Reply with Method Unknown error to unknown query methods received

7 years agoFix race condition in TestPieceHashFailed
Matt Joiner [Tue, 13 Dec 2016 03:44:00 +0000 (14:44 +1100)]
Fix race condition in TestPieceHashFailed

7 years agoAdded optional source flag to torrent files (#137)
Barsanuphe [Fri, 9 Dec 2016 02:16:56 +0000 (03:16 +0100)]
Added optional source flag to torrent files (#137)

7 years agoFix piece failures not clearing dirty chunks
Matt Joiner [Tue, 6 Dec 2016 05:10:10 +0000 (16:10 +1100)]
Fix piece failures not clearing dirty chunks

I don’t like how complicated piece completion/hashing management is, but it works.

7 years agoMerge commit 'c8dffdb'
Matt Joiner [Tue, 6 Dec 2016 04:43:00 +0000 (15:43 +1100)]
Merge commit 'c8dffdb'

7 years agoAdd test that dirty chunks are cleared on piece hash failure
Matt Joiner [Tue, 6 Dec 2016 04:41:08 +0000 (15:41 +1100)]
Add test that dirty chunks are cleared on piece hash failure

7 years agoReader.Close: Don’t set t to nil, we may still expect it
Matt Joiner [Mon, 5 Dec 2016 11:00:26 +0000 (22:00 +1100)]
Reader.Close: Don’t set t to nil, we may still expect it

For example in goroutines spawned in ReadContext.

7 years agoiplist: Begin adding support for parsing CIDR lists
Matt Joiner [Thu, 1 Dec 2016 04:41:52 +0000 (15:41 +1100)]
iplist: Begin adding support for parsing CIDR lists

7 years agoAdd Torrent.Closed
Matt Joiner [Wed, 30 Nov 2016 07:02:39 +0000 (18:02 +1100)]
Add Torrent.Closed

7 years agocmd/torrent: Accept infohash: scheme torrents
Matt Joiner [Wed, 30 Nov 2016 07:02:21 +0000 (18:02 +1100)]
cmd/torrent: Accept infohash: scheme torrents

7 years agoFix logging of trust slice
Matt Joiner [Wed, 30 Nov 2016 07:01:39 +0000 (18:01 +1100)]
Fix logging of trust slice

7 years agoAvoid deadlock caused by receiving PORT and and DHT announce_peer at the same time
Matt Joiner [Sun, 27 Nov 2016 13:03:10 +0000 (00:03 +1100)]
Avoid deadlock caused by receiving PORT and and DHT announce_peer at the same time

7 years agoFix deadlock in Client.onDHTAnnouncePeer
Matt Joiner [Sun, 27 Nov 2016 03:43:21 +0000 (14:43 +1100)]
Fix deadlock in Client.onDHTAnnouncePeer

7 years agoFix harmless race conditions in Client.WriteStatus introduced way back
Matt Joiner [Sun, 27 Nov 2016 03:26:45 +0000 (14:26 +1100)]
Fix harmless race conditions in Client.WriteStatus introduced way back

7 years agodht.NewServer: Initialize the tokenServer
Matt Joiner [Sat, 26 Nov 2016 15:22:47 +0000 (02:22 +1100)]
dht.NewServer: Initialize the tokenServer

7 years agoAdd peers received from received announce_peer DHT messages to the Client
Matt Joiner [Sat, 26 Nov 2016 13:05:19 +0000 (00:05 +1100)]
Add peers received from received announce_peer DHT messages to the Client

Addresses #133

7 years agodht.Server: Return valid token from get_peers, and handle incoming announce_peer
Matt Joiner [Sat, 26 Nov 2016 05:14:37 +0000 (16:14 +1100)]
dht.Server: Return valid token from get_peers, and handle incoming announce_peer

Addresses #133.

7 years agoRemove unused function
Matt Joiner [Fri, 25 Nov 2016 06:24:29 +0000 (17:24 +1100)]
Remove unused function

7 years agoRemove completed TODO item
Matt Joiner [Fri, 25 Nov 2016 06:24:16 +0000 (17:24 +1100)]
Remove completed TODO item

7 years agoKick only the worst connection when a piece fails a check
Matt Joiner [Wed, 23 Nov 2016 01:59:23 +0000 (12:59 +1100)]
Kick only the worst connection when a piece fails a check

7 years agoAdd a note about dropping connections that we sent a HAVE for incomplete pieces
Matt Joiner [Wed, 23 Nov 2016 00:52:41 +0000 (11:52 +1100)]
Add a note about dropping connections that we sent a HAVE for incomplete pieces

7 years agoMake Torrent.conns a map
Matt Joiner [Wed, 23 Nov 2016 00:48:44 +0000 (11:48 +1100)]
Make Torrent.conns a map

Can't remember if I've tried this before. But dropping arbitrary connections while iterating established conns will become much simpler.

7 years agoMove a bunch of Client methods onto more appropriate types
Matt Joiner [Tue, 22 Nov 2016 10:12:53 +0000 (21:12 +1100)]
Move a bunch of Client methods onto more appropriate types

7 years agotracker: Support the original http response peers format
Matt Joiner [Tue, 22 Nov 2016 04:40:46 +0000 (15:40 +1100)]
tracker: Support the original http response peers format

Fixes #130

7 years agoDon't accept pieces with bad indexes
Matt Joiner [Tue, 22 Nov 2016 03:20:48 +0000 (14:20 +1100)]
Don't accept pieces with bad indexes

Fixes #132

7 years agoRename connection.downloadedChunk -> receiveChunk
Matt Joiner [Tue, 22 Nov 2016 03:18:09 +0000 (14:18 +1100)]
Rename connection.downloadedChunk -> receiveChunk

7 years agoMake downloadedChunk a method of connection
Matt Joiner [Tue, 22 Nov 2016 03:17:30 +0000 (14:17 +1100)]
Make downloadedChunk a method of connection

7 years agoMove Client.downloadedChunk to connection.go
Matt Joiner [Tue, 22 Nov 2016 03:16:18 +0000 (14:16 +1100)]
Move Client.downloadedChunk to connection.go

7 years agoTODO
Matt Joiner [Tue, 22 Nov 2016 03:01:17 +0000 (14:01 +1100)]
TODO

7 years agogofmt simplify
Matt Joiner [Tue, 22 Nov 2016 03:01:09 +0000 (14:01 +1100)]
gofmt simplify

7 years agometainfo: Remove unused import
Matt Joiner [Tue, 8 Nov 2016 10:09:04 +0000 (21:09 +1100)]
metainfo: Remove unused import

7 years agofeat: remove print BuildFromFilePath
Vincent [Fri, 4 Nov 2016 22:32:51 +0000 (15:32 -0700)]
feat: remove print BuildFromFilePath

removes the print of (path, err) in function BuildFromFilePath

7 years agoReader.Close: Prefer to lock Client in public method
Matt Joiner [Mon, 31 Oct 2016 08:05:33 +0000 (19:05 +1100)]
Reader.Close: Prefer to lock Client in public method

7 years agoTorrent.unpendPieces: Only update unpended pieces
Matt Joiner [Mon, 31 Oct 2016 08:05:08 +0000 (19:05 +1100)]
Torrent.unpendPieces: Only update unpended pieces

Updating all pieces at once is no longer faster. (There was an optimization for this a while ago that no longer exists.)

7 years agoWhen Reader position changes only update piece priorities that may be affected
Matt Joiner [Mon, 31 Oct 2016 08:00:08 +0000 (19:00 +1100)]
When Reader position changes only update piece priorities that may be affected

Seems to significantly reduce CPU load reading from torrents with huge piece counts.

7 years agoDitch the use of generic slices.HeapInterface for finding the worst "bad" connection
Matt Joiner [Mon, 31 Oct 2016 05:24:48 +0000 (16:24 +1100)]
Ditch the use of generic slices.HeapInterface for finding the worst "bad" connection

It's become a bottleneck. Implement it directly using heap.Interface.

7 years agoComment on connection.updatePiecePriority
Matt Joiner [Mon, 31 Oct 2016 05:22:07 +0000 (16:22 +1100)]
Comment on connection.updatePiecePriority

There's also Torrent.updatePiecePriority, and it's always confusing what the difference is.

7 years agostorage: ClientImpl interface now includes Close
Matt Joiner [Tue, 25 Oct 2016 09:00:09 +0000 (20:00 +1100)]
storage: ClientImpl interface now includes Close

This is now necessary because bolt doesn't allow multiple DB handles, so the bolt piece completion DB instance must be at the client level. The new method is not currently used from the Client however, this maybe necessary to avoid leaks.

7 years agostorage: Fix spelling mistake
Matt Joiner [Tue, 25 Oct 2016 08:57:35 +0000 (19:57 +1100)]
storage: Fix spelling mistake

7 years agostorage: Only include sqlite3 piece completion implementation if cgo is enabled
Matt Joiner [Tue, 25 Oct 2016 08:54:09 +0000 (19:54 +1100)]
storage: Only include sqlite3 piece completion implementation if cgo is enabled

Issue #124.

7 years agostorage: Remove sqlite3 import from bolt implementation
Matt Joiner [Tue, 25 Oct 2016 08:52:44 +0000 (19:52 +1100)]
storage: Remove sqlite3 import from bolt implementation

#124

7 years agoTrivial HTTP support for adding torrent files by (#126)
Igor Shishkin [Tue, 25 Oct 2016 08:13:06 +0000 (11:13 +0300)]
Trivial HTTP support for adding torrent files by (#126)

* Trivial HTTP support for adding torrent files by

Sometimes it's really usefull to do not download
torrent file locally but simply pass HTTP link
this patch adds such ability.

Signed-off-by: Igor Shishkin <me@teran.ru>
* Fix for closing http connection after use

Signed-off-by: Igor Shishkin <me@teran.ru>