/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
} else {
node.Busy = true
node.Unlock()
+
+ var autoTossFinish chan struct{}
+ var autoTossBadCode chan bool
+ if call.AutoToss {
+ autoTossFinish, autoTossBadCode = ctx.AutoToss(
+ node.Id,
+ call.Nice,
+ call.AutoTossDoSeen,
+ call.AutoTossNoFile,
+ call.AutoTossNoFreq,
+ call.AutoTossNoExec,
+ call.AutoTossNoTrns,
+ )
+ }
+
ctx.CallNode(
node,
addrs,
false,
nil,
)
+
+ if call.AutoToss {
+ close(autoTossFinish)
+ <-autoTossBadCode
+ }
+
node.Lock()
node.Busy = false
node.Unlock()