]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' v5.3.1
authorSergey Matveev <stargrave@stargrave.org>
Wed, 25 Dec 2019 13:21:56 +0000 (16:21 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 25 Dec 2019 13:21:56 +0000 (16:21 +0300)
VERSION
doc/cmds.texi
doc/download.texi
doc/install.texi
doc/news.ru.texi
doc/news.texi
ports/nncp/Makefile
src/cmd/nncp-stat/main.go
src/pipe.go
src/sp.go

diff --git a/VERSION b/VERSION
index 03f488b076ae34efcfad44444186507b6415e8cc..c7cb1311a645f7c6c54caec24df8040e7e21e4fb 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.3.0
+5.3.1
index c4c6d01f6de38728823a29473b875336320871ab..9fff9e4679f77d1bc951d619b18fe0e8705ff6e3 100644 (file)
@@ -502,13 +502,14 @@ ones. If @option{-seen} option is specified, then delete only
 @section nncp-stat
 
 @example
-$ nncp-stat [options] [-node NODE]
+$ nncp-stat [options] [-pkt] [-node NODE]
 @end example
 
 Print current @ref{Spool, spool} statistics about unsent and unprocessed
 packets. For each node (unless @option{-node} specified) and each
 niceness level there will be printed how many packets (with the total
-size) are in inbound (Rx) and outbound (Tx) queues.
+size) are in inbound (Rx) and outbound (Tx) queues. @option{-pkt} option
+show information about each packet.
 
 @node nncp-toss
 @section nncp-toss
index fd6c17d9a1910245bca8a06a031765db2a51be77..01f7d89af22b9f3cbb0709b640b173b8496da6b5 100644 (file)
@@ -24,6 +24,10 @@ Tarballs include all necessary required libraries:
 @multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 5.3.0, 5.3.0} @tab 2019-12-22 @tab 1112 KiB
+@tab @url{download/nncp-5.3.0.tar.xz, link} @url{download/nncp-5.3.0.tar.xz.sig, sign}
+@tab @code{9F093115 506D00E7 2E41ACD6 3F283172 8430E1C2 8BA4A941 FFA3C65D 89AD4ED0}
+
 @item @ref{Release 5.2.1, 5.2.1} @tab 2019-12-15 @tab 1109 KiB
 @tab @url{download/nncp-5.2.1.tar.xz, link} @url{download/nncp-5.2.1.tar.xz.sig, sign}
 @tab @code{983D1A8A 4398C281 76356AE1 C5541124 B0755555 D115063B D1388F85 9C4A6B3E}
index 5db01d04bbe4c770d1768a205e9befd393638b6b..413de36fe72141c48f12c95632c0b95a8b7d5cf3 100644 (file)
@@ -1,7 +1,7 @@
 @node Installation
 @unnumbered Installation
 
-@set VERSION 5.3.0
+@set VERSION 5.3.1
 
 Possibly NNCP package already exists for your distribution:
 
index ba347167b8a4416a48c6fa79f943b5d3e8d0920b..73614086900f782c20ac8764481d6091c50682cf 100644 (file)
@@ -1,6 +1,20 @@
 @node Новости
 @section Новости
 
+@node Релиз 5.3.1
+@subsection Релиз 5.3.1
+@itemize
+
+@item
+Исправлена работоспособность @option{onlinedeadline} с адресами вызова
+использующими внешние команды (@verb{#"|somecmd"#}).
+
+@item
+@command{nncp-stat} имеет опцию @option{-pkt} показывающую информацию по
+каждому пакету в spool.
+
+@end itemize
+
 @node Релиз 5.3.0
 @subsection Релиз 5.3.0
 @itemize
index 9d9e877d85548015168275447680c26bead33777..697ced820b0f27caa86fc4f0733a5bd6a211c2c3 100644 (file)
@@ -3,6 +3,20 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 5.3.1
+@section Release 5.3.1
+@itemize
+
+@item
+Fixed @option{onlinedeadline} workability with call addresses that use
+external commands (@verb{#"|somecmd"#}).
+
+@item
+@command{nncp-stat} has @option{-pkt} option displaying information
+about each packet in the spool.
+
+@end itemize
+
 @node Release 5.3.0
 @section Release 5.3.0
 @itemize
index 3b5109ba60f467b98edf963586992ebc2e38cdcd..00943d5dadeec95779be89bb0c14eee2caa914b8 100644 (file)
@@ -1,7 +1,7 @@
-# $FreeBSD: head/net/nncp/Makefile 517819 2019-11-17 11:51:56Z dmgk $
+# $FreeBSD: $
 
 PORTNAME=      nncp
-DISTVERSION=   5.3.0
+DISTVERSION=   5.3.1
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index 22eaca0af5376a54198a7dfaf9fa5dcaa1b3f142..09cc63b66e8157ef7e51847b16bf290e21a758d6 100644 (file)
@@ -32,12 +32,23 @@ import (
 func usage() {
        fmt.Fprintf(os.Stderr, nncp.UsageHeader())
        fmt.Fprintf(os.Stderr, "nncp-stat -- show queued Rx/Tx stats\n\n")
-       fmt.Fprintf(os.Stderr, "Usage: %s [options]\nOptions:\n", os.Args[0])
+       fmt.Fprintf(os.Stderr, "Usage: %s [options] [-pkt] [-node NODE]\nOptions:\n", os.Args[0])
        flag.PrintDefaults()
 }
 
+func jobPrint(xx nncp.TRxTx, job nncp.Job) {
+       fmt.Printf(
+               "\t%s %s %s (nice: %s)\n",
+               string(xx),
+               nncp.ToBase32(job.HshValue[:]),
+               humanize.IBytes(uint64(job.Size)),
+               nncp.NicenessFmt(job.PktEnc.Nice),
+       )
+}
+
 func main() {
        var (
+               showPkt   = flag.Bool("pkt", false, "Show packets listing")
                cfgPath   = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
                nodeRaw   = flag.String("node", "", "Process only that node")
                spoolPath = flag.String("spool", "", "Override path to spool")
@@ -84,10 +95,14 @@ func main() {
                if nodeOnly != nil && *node.Id != *nodeOnly.Id {
                        continue
                }
+               fmt.Println(node.Name)
                rxNums := make(map[uint8]int)
                rxBytes := make(map[uint8]int64)
                for job := range ctx.Jobs(node.Id, nncp.TRx) {
                        job.Fd.Close()
+                       if *showPkt {
+                               jobPrint(nncp.TRx, job)
+                       }
                        rxNums[job.PktEnc.Nice] = rxNums[job.PktEnc.Nice] + 1
                        rxBytes[job.PktEnc.Nice] = rxBytes[job.PktEnc.Nice] + job.Size
                }
@@ -95,10 +110,12 @@ func main() {
                txBytes := make(map[uint8]int64)
                for job := range ctx.Jobs(node.Id, nncp.TTx) {
                        job.Fd.Close()
+                       if *showPkt {
+                               jobPrint(nncp.TRx, job)
+                       }
                        txNums[job.PktEnc.Nice] = txNums[job.PktEnc.Nice] + 1
                        txBytes[job.PktEnc.Nice] = txBytes[job.PktEnc.Nice] + job.Size
                }
-               fmt.Println(node.Name)
                var nice uint8
                for nice = 1; nice > 0; nice++ {
                        rxNum, rxExists := rxNums[nice]
index a250ceedd2b2548140ec69bae513ee5f1dfb3e50..1b50573bf75fb983283452f9b2c746f844a7ab2d 100644 (file)
@@ -65,6 +65,7 @@ func (c PipeConn) SetWriteDeadline(t time.Time) error {
 }
 
 func (c PipeConn) Close() (err error) {
+       c.r.Close()
        err = c.w.Close()
        go c.cmd.Wait()
        time.AfterFunc(time.Duration(10*time.Second), func() { c.cmd.Process.Kill() })
index 1297c414cb3d5c175720fc0178fe3e21224fec40..aca6f18c1824caf6d5908609b88c22841cb29c59 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -22,7 +22,6 @@ import (
        "crypto/subtle"
        "errors"
        "io"
-       "net"
        "os"
        "path/filepath"
        "sort"
@@ -606,7 +605,6 @@ func (state *SPState) StartWorkers(
                                        go func() {
                                                state.pings <- struct{}{}
                                                state.wg.Done()
-                                               state.Ctx.LogD("HERE", SDS{}, "PING GOROUTINE QUIT")
                                        }()
                                }
                        }
@@ -768,8 +766,7 @@ func (state *SPState) StartWorkers(
                                        break
                                }
                                unmarshalErr := err.(*xdr.UnmarshalError)
-                               netErr, ok := unmarshalErr.Err.(net.Error)
-                               if ok && netErr.Timeout() {
+                               if os.IsTimeout(unmarshalErr.Err) {
                                        continue
                                }
                                if unmarshalErr.ErrorCode == xdr.ErrIO {