]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cypherpunks.ru/nncp/cfg.go
Workability of xxrate in calls section
[nncp.git] / src / cypherpunks.ru / nncp / cfg.go
index 9519f963a6d805d9a1b2eb880d2407e7b46ae38e..bcd547ec91c5e13cbc6052d69c6164e35e9c3f6f 100644 (file)
@@ -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
                }