From: Sergey Matveev Date: Sun, 15 Dec 2019 09:12:30 +0000 (+0300) Subject: Fix error type assertion X-Git-Tag: v5.2.1^2 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=8acf65085c9baac6ab39a90a51f66f2b9b4649b5 Fix error type assertion --- diff --git a/VERSION b/VERSION index 91ff572..26d99a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.2.0 +5.2.1 diff --git a/doc/Makefile b/doc/Makefile index 0223490..205c2b4 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ -all: nncp.info nncp.html - MAKEINFO ?= makeinfo +all: nncp.info nncp.html + sp.utxt: sp.txt plantuml -tutxt sp.txt diff --git a/doc/index.texi b/doc/index.texi index 56480cf..a83ea31 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -2,8 +2,6 @@ @documentencoding UTF-8 @settitle NNCP -@set VERSION 5.2.0 - @copying This manual is for NNCP (Node to Node copy) -- collection of utilities simplifying secure store-and-forward files and mail exchanging. diff --git a/doc/install.texi b/doc/install.texi index b94b3bc..1c8497e 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -1,6 +1,8 @@ @node Installation @unnumbered Installation +@set VERSION 5.2.1 + Possibly NNCP package already exists for your distribution: @itemize diff --git a/doc/news.ru.texi b/doc/news.ru.texi index fa95bf5..2e5d927 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,15 @@ @node Новости @section Новости +@node Релиз 5.2.1 +@subsection Релиз 5.2.1 +@itemize + +@item +Исправлена обработка ошибки SP протокола, иногда вызывающая панику программы. + +@end itemize + @node Релиз 5.2.0 @subsection Релиз 5.2.0 @itemize diff --git a/doc/news.texi b/doc/news.texi index 4613557..6cdc998 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,15 @@ See also this page @ref{Новости, on russian}. +@node Release 5.2.1 +@section Release 5.2.1 +@itemize + +@item +Fixed SP protocol error handling, sometimes causing program panic. + +@end itemize + @node Release 5.2.0 @section Release 5.2.0 @itemize diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 31bf18a..6dca46a 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: head/net/nncp/Makefile 517819 2019-11-17 11:51:56Z dmgk $ PORTNAME= nncp -DISTVERSION= 5.2.0 +DISTVERSION= 5.2.1 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ diff --git a/src/sp.go b/src/sp.go index ce2e62f..fa853b0 100644 --- a/src/sp.go +++ b/src/sp.go @@ -680,6 +680,9 @@ func (state *SPState) StartWorkers( conn.SetReadDeadline(time.Now().Add(DefaultDeadline * time.Second)) payload, err := state.ReadSP(conn) if err != nil { + if err == io.EOF { + break + } unmarshalErr := err.(*xdr.UnmarshalError) netErr, ok := unmarshalErr.Err.(net.Error) if ok && netErr.Timeout() {