doc/download.texi | 4 ++++ doc/news.ru.texi | 10 ++++++++++ doc/news.texi | 9 +++++++++ ports/nncp/Makefile | 2 +- src/nncp.go | 2 +- src/sp.go | 48 ++++++++++++++++++++++++++++-------------------- diff --git a/doc/download.texi b/doc/download.texi index 7d408c483ce55b759d6de8138c4b623bee5ec93544d95e8b9ccc458378dfc32a..4277a5ea11929dec66b63cc7997b864fb8e7ae016435e534b0263649fb4e2712 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -25,6 +25,10 @@ @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.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} + @item @ref{Release 6.2.0, 6.2.0} @tab 2021-03-07 @tab 1038 KiB @tab @url{download/nncp-6.2.0.tar.xz, link} @url{download/nncp-6.2.0.tar.xz.sig, sign} @tab @code{272CEDED 69FFF3B3 78767297 3199481A C610B753 BB82C22E ECEC45FC 05DA40FE} diff --git a/doc/news.ru.texi b/doc/news.ru.texi index d66212632ebe328ff69d9ed6cff3684197988a39c9cdf660d7f2d3248452f242..2f5d164be9ec32669696e0937aea9fc2d6c71f080d1bc9e8c76a5207314a2845 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,16 @@ @node Новости @section Новости +@node Релиз 6.3.0 +@subsection Релиз 6.3.0 +@itemize + +@item +Исправлено возможное падение программы во время показа прогресса online +протокола. + +@end itemize + @node Релиз 6.2.1 @subsection Релиз 6.2.1 @itemize diff --git a/doc/news.texi b/doc/news.texi index 74e4c5dd9ab4dfadc67415122ebe72bc50967017d4c81043d8819f09e860f2c9..32cc8b8996e77503ce53bacff0f67c9fc21ce99e1af23753dcfc4ca45fb0217a 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,15 @@ @unnumbered News See also this page @ref{Новости, on russian}. +@node Release 6.3.0 +@section Release 6.3.0 +@itemize + +@item +Fixed possible panic while showing progress during online protocol. + +@end itemize + @node Release 6.2.1 @section Release 6.2.1 @itemize diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 9ac17a039d57798670b8d85b90d1a51f4291dd558004a470116f5b823a47d53b..56efd5e6f85b20f329b08cec9a84a7c97621531bfbc6beb71ab33032423fbbb3 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: $ PORTNAME= nncp -DISTVERSION= 6.1.0 +DISTVERSION= 6.3.0 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ diff --git a/src/nncp.go b/src/nncp.go index dd1ac260d984f156de6a64aefb49c97d7148d2e5cb805603b752b882d0d43ab2..05fa9c054a6f84a5992f127426c5d0b4749a2aa0dde7071bf2d74df2257e20f2 100644 --- a/src/nncp.go +++ b/src/nncp.go @@ -40,7 +40,7 @@ const Base32Encoded32Len = 52 var ( - Version string = "6.2.1" + Version string = "6.3.0" Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) ) diff --git a/src/sp.go b/src/sp.go index 7a90b06621171285acc72ea5eff30849f7cdc2b4697d579b4a222d384f31f1d8..16fa163a00bb1a86b180101f8e5ba933867ebc59b55110118c1756d0a833062d 100644 --- a/src/sp.go +++ b/src/sp.go @@ -729,7 +729,7 @@ go func() { for _, payload := range infosPayloads[1:] { state.Ctx.LogD( "sp-queue-remaining", - append(les, LE{"Size", len(payload)}), + append(les, LE{"Size", int64(len(payload))}), func(les LEs) string { return fmt.Sprintf( "SP with %s (nice %s): queuing remaining payload (%s)", @@ -752,7 +752,7 @@ state.Node.Name, NicenessFmt(state.Nice), humanize.IBytes(uint64(len(payload))), ) } - state.Ctx.LogD("sp-process", append(les, LE{"Size", len(payload)}), logMsg) + state.Ctx.LogD("sp-process", append(les, LE{"Size", int64(len(payload))}), logMsg) replies, err := state.ProcessSP(payload) if err != nil { state.Ctx.LogE("sp-process", les, err, logMsg) @@ -763,7 +763,7 @@ go func() { for _, reply := range replies { state.Ctx.LogD( "sp-queue-reply", - append(les, LE{"Size", len(reply)}), + append(les, LE{"Size", int64(len(reply))}), func(les LEs) string { return fmt.Sprintf( "SP with %s (nice %s): queuing reply (%s)", @@ -828,7 +828,7 @@ &state.infosOurSeen, ) { state.Ctx.LogD( "sp-queue-info", - append(les, LE{"Size", len(payload)}), + append(les, LE{"Size", int64(len(payload))}), func(les LEs) string { return fmt.Sprintf( "SP with %s (nice %s): queuing new info (%s)", @@ -869,7 +869,7 @@ ping = true case payload = <-state.payloads: state.Ctx.LogD( "sp-got-payload", - append(les, LE{"Size", len(payload)}), + append(les, LE{"Size", int64(len(payload))}), func(les LEs) string { return fmt.Sprintf( "SP with %s (nice %s): got payload (%s)", @@ -955,16 +955,18 @@ }) return } buf = buf[:n] - state.Ctx.LogD( - "sp-file-read", - append(lesp, LE{"Size", n}), - func(les LEs) string { - return fmt.Sprintf( - "%s: read %s", - logMsg(les), humanize.IBytes(uint64(n)), - ) - }, + lesp = append( + les, + LE{"XX", string(TTx)}, + LE{"Pkt", pktName}, + LE{"Size", int64(n)}, ) + state.Ctx.LogD("sp-file-read", lesp, func(les LEs) string { + return fmt.Sprintf( + "%s: read %s", + logMsg(les), humanize.IBytes(uint64(n)), + ) + }) } state.closeFd(pth) payload = MarshalSP(SPTypeFile, SPFile{ @@ -973,7 +975,13 @@ Offset: freq.Offset, Payload: buf, }) ourSize := freq.Offset + uint64(len(buf)) - lesp = append(lesp, LE{"Size", int64(ourSize)}, LE{"FullSize", fullSize}) + lesp = append( + les, + LE{"XX", string(TTx)}, + LE{"Pkt", pktName}, + LE{"Size", int64(ourSize)}, + LE{"FullSize", fullSize}, + ) if state.Ctx.ShowPrgrs { Progress("Tx", lesp) } @@ -1005,7 +1013,7 @@ state.Node.Name, NicenessFmt(state.Nice), humanize.IBytes(uint64(len(payload))), ) } - state.Ctx.LogD("sp-sending", append(les, LE{"Size", len(payload)}), logMsg) + state.Ctx.LogD("sp-sending", append(les, LE{"Size", int64(len(payload))}), logMsg) conn.SetWriteDeadline(time.Now().Add(DefaultDeadline)) // #nosec G104 if err := state.WriteSP(conn, state.csOur.Encrypt(nil, nil, payload), ping); err != nil { state.Ctx.LogE("sp-sending", les, err, logMsg) @@ -1053,7 +1061,7 @@ ) } state.Ctx.LogD( "sp-recv-got", - append(les, LE{"Size", len(payload)}), + append(les, LE{"Size", int64(len(payload))}), func(les LEs) string { return logMsg(les) + ": got" }, ) payload, err = state.csTheir.Decrypt(nil, nil, payload) @@ -1065,7 +1073,7 @@ break } state.Ctx.LogD( "sp-recv-process", - append(les, LE{"Size", len(payload)}), + append(les, LE{"Size", int64(len(payload))}), func(les LEs) string { return logMsg(les) + ": processing" }, @@ -1082,7 +1090,7 @@ go func() { for _, reply := range replies { state.Ctx.LogD( "sp-recv-reply", - append(les[:len(les)-1], LE{"Size", len(reply)}), + append(les[:len(les)-1], LE{"Size", int64(len(reply))}), func(les LEs) string { return fmt.Sprintf( "SP with %s (nice %s): queuing reply (%s)", @@ -1326,7 +1334,7 @@ lesp = append( lesp, LE{"XX", string(TRx)}, LE{"Pkt", pktName}, - LE{"Size", len(file.Payload)}, + LE{"Size", int64(len(file.Payload))}, ) logMsg := func(les LEs) string { return fmt.Sprintf(