summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars K.W. Gohlke <lkwg82@gmx.de>2016-04-22 21:15:36 +0000
committerAudrius Butkevicius <audrius.butkevicius@gmail.com>2016-04-22 21:15:36 +0000
commite87c1abd4e4391a450681b75be08f10ff9ce6869 (patch)
tree90e46b388a503f00e87c4a6c9a1b838b216c147a
parentdffc34559b215120ffaad7b1dcf5e290deb3b750 (diff)
all: Clean up dead code
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3005
-rw-r--r--lib/model/devicedownloadstate.go5
-rwxr-xr-xlib/model/progressemitter.go1
-rw-r--r--lib/model/rwfolder.go10
3 files changed, 2 insertions, 14 deletions
diff --git a/lib/model/devicedownloadstate.go b/lib/model/devicedownloadstate.go
index f95b2631b7..e3c05787fb 100644
--- a/lib/model/devicedownloadstate.go
+++ b/lib/model/devicedownloadstate.go
@@ -90,9 +90,8 @@ func (p *deviceFolderDownloadState) NumberOfBlocksInProgress() int {
// deviceDownloadState represents the state of all in progress downloads
// for all folders of a specific device.
type deviceDownloadState struct {
- mut sync.RWMutex
- folders map[string]*deviceFolderDownloadState
- numberOfBlocksInProgress int
+ mut sync.RWMutex
+ folders map[string]*deviceFolderDownloadState
}
// Update updates internal state of what has been downloaded into the temporary
diff --git a/lib/model/progressemitter.go b/lib/model/progressemitter.go
index a4d225d74f..5715e0cc57 100755
--- a/lib/model/progressemitter.go
+++ b/lib/model/progressemitter.go
@@ -21,7 +21,6 @@ type ProgressEmitter struct {
registry map[string]*sharedPullerState
interval time.Duration
minBlocks int
- lastUpdate time.Time
sentDownloadStates map[protocol.DeviceID]*sentDownloadState // States representing what we've sent to the other peer via DownloadProgress messages.
connections map[string][]protocol.Connection
mut sync.Mutex
diff --git a/lib/model/rwfolder.go b/lib/model/rwfolder.go
index 3947f38f66..44bfac512e 100644
--- a/lib/model/rwfolder.go
+++ b/lib/model/rwfolder.go
@@ -1492,16 +1492,6 @@ func (p *rwFolder) inConflict(current, replacement protocol.Vector) bool {
return false
}
-func invalidateFolder(cfg *config.Configuration, folderID string, err error) {
- for i := range cfg.Folders {
- folder := &cfg.Folders[i]
- if folder.ID == folderID {
- folder.Invalid = err.Error()
- return
- }
- }
-}
-
func removeAvailability(availabilities []Availability, availability Availability) []Availability {
for i := range availabilities {
if availabilities[i] == availability {