Skip to content

Commit

Permalink
Fixed a 64-bit integer alighment problem on 32-bit OS
Browse files Browse the repository at this point in the history
A new variable was added previosuly which caused a 64-bit variable to be not
aligned on a 8-byte boundary.  Go still can't handle such variables on 32-bit
OS.
  • Loading branch information
gilbertchen committed Oct 1, 2020
1 parent 2f407d6 commit 0da55f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/duplicacy_chunkdownloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ type ChunkDownloadCompletion struct {
// corresponding ChunkDownloadTask is sent to the dowloading goroutine. Once a chunk is downloaded, it will be
// inserted in the completed task list.
type ChunkDownloader struct {
totalChunkSize int64 // Total chunk size
downloadedChunkSize int64 // Downloaded chunk size

config *Config // Associated config
storage Storage // Download from this storage
snapshotCache *FileStorage // Used as cache if not nil; usually for downloading snapshot chunks
Expand All @@ -47,8 +50,6 @@ type ChunkDownloader struct {
completionChannel chan ChunkDownloadCompletion // A downloading goroutine sends back the chunk via this channel after downloading

startTime int64 // The time it starts downloading
totalChunkSize int64 // Total chunk size
downloadedChunkSize int64 // Downloaded chunk size
numberOfDownloadedChunks int // The number of chunks that have been downloaded
numberOfDownloadingChunks int // The number of chunks still being downloaded
numberOfActiveChunks int // The number of chunks that is being downloaded or has been downloaded but not reclaimed
Expand Down

0 comments on commit 0da55f9

Please sign in to comment.