From: Sergey Matveev Date: Sat, 27 Apr 2019 21:02:16 +0000 (+0300) Subject: Workability of xxrate in calls section X-Git-Tag: 4.0^2~5 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=dcb4098ef4881f74d5eb3e2582bf1be9b7c8af9b;p=nncp.git Workability of xxrate in calls section --- diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 480a565..832d30e 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -19,6 +19,9 @@ @item @command{nncp-call} может скачивать только чётко указанные пакеты. @item +Восстановлена работоспособность @option{xxrate} настройки в +@option{calls} секции конфигурационного файла. +@item Зависимые библиотеки обновлены. @item Небольшие исправления ошибок. diff --git a/doc/news.texi b/doc/news.texi index baf52c0..f087abe 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -20,6 +20,9 @@ without its transmission. @item @command{nncp-call} has ability to download only specified packets. @item +Workability of @option{xxrate} preference in @option{calls} +configuration file section. +@item Dependant libraries are updated. @item Minor bugfixes. diff --git a/src/cypherpunks.ru/nncp/cfg.go b/src/cypherpunks.ru/nncp/cfg.go index 9519f96..bcd547e 100644 --- a/src/cypherpunks.ru/nncp/cfg.go +++ b/src/cypherpunks.ru/nncp/cfg.go @@ -214,12 +214,12 @@ func NewNode(name string, yml NodeYAML) (*Node, error) { return nil, errors.New("xx field must be either \"rx\" or \"tx\"") } - rxRate := 0 - if callYml.RxRate != nil && *callYml.RxRate > 0 { + rxRate := defRxRate + if callYml.RxRate != nil { rxRate = *callYml.RxRate } - txRate := 0 - if callYml.TxRate != nil && *callYml.TxRate > 0 { + txRate := defTxRate + if callYml.TxRate != nil { txRate = *callYml.TxRate }