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
}
func CfgParse(data []byte) (*Ctx, error) {
var err error
- if bytes.Compare(data[:8], MagicNNCPBv2[:]) == 0 {
+ if bytes.Compare(data[:8], MagicNNCPBv3[:]) == 0 {
os.Stderr.WriteString("Passphrase:")
password, err := terminal.ReadPassword(0)
if err != nil {