@multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
@headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
+@item @ref{Release 6.3.0, 6.3.0} @tab 2021-04-14 @tab 1042 KiB
+@tab @url{download/nncp-6.3.0.tar.xz, link} @url{download/nncp-6.3.0.tar.xz.sig, sign}
+@tab @code{76C26A11 E3423540 BB7B8470 820176A3 5FCD0493 B21A872E C223EB94 43BA466B}
+
@item @ref{Release 6.2.1, 6.2.1} @tab 2021-03-26 @tab 1038 KiB
@tab @url{download/nncp-6.2.1.tar.xz, link} @url{download/nncp-6.2.1.tar.xz.sig, sign}
@tab @code{D9682D95 4D68025A F5B07516 258D9FFC DA29A4D7 E7E1635B E0C219A1 C5DDB067}
const Base32Encoded32Len = 52
var (
- Version string = "6.3.0"
+ Version string = "6.4.0"
Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding)
)
onlyPkts map[[32]byte]bool
writeSPBuf bytes.Buffer
fds map[string]FdAndFullSize
+ fdsLock sync.RWMutex
fileHashers map[string]*HasherAndOffset
checkerQueues SPCheckerQueues
sync.RWMutex
}
func (state *SPState) closeFd(pth string) {
- s, exists := state.fds[pth]
- delete(state.fds, pth)
- if exists {
+ state.fdsLock.Lock()
+ if s, exists := state.fds[pth]; exists {
+ delete(state.fds, pth)
s.fd.Close()
}
+ state.fdsLock.Unlock()
}
func (state *SPState) StartWorkers(
string(TTx),
Base32Codec.EncodeToString(freq.Hash[:]),
)
+ state.fdsLock.RLock()
fdAndFullSize, exists := state.fds[pth]
+ state.fdsLock.RUnlock()
if !exists {
fd, err := os.Open(pth)
if err != nil {
return
}
fdAndFullSize = FdAndFullSize{fd: fd, fullSize: fi.Size()}
+ state.fdsLock.Lock()
state.fds[pth] = fdAndFullSize
+ state.fdsLock.Unlock()
}
fd := fdAndFullSize.fd
fullSize := fdAndFullSize.fullSize
state.Ctx.LogD("sp-file-open", lesp, func(les LEs) string {
return logMsg(les) + ": opening part"
})
+ state.fdsLock.RLock()
fdAndFullSize, exists := state.fds[filePathPart]
+ state.fdsLock.RUnlock()
var fd *os.File
if exists {
fd = fdAndFullSize.fd
})
return nil, err
}
+ state.fdsLock.Lock()
state.fds[filePathPart] = FdAndFullSize{fd: fd}
+ state.fdsLock.Unlock()
if file.Offset == 0 {
h, err := blake2b.New256(nil)
if err != nil {