]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/call.go
On demand calling
[nncp.git] / src / call.go
index 339549825004f97da322b5cd00a3d44eb6c0fb07..1635b3042c77036b697421b601e821dc8dcaf176 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2020 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
@@ -33,6 +33,14 @@ type Call struct {
        Addr           *string
        OnlineDeadline time.Duration
        MaxOnlineTime  time.Duration
+       WhenTxExists   bool
+
+       AutoToss       bool
+       AutoTossDoSeen bool
+       AutoTossNoFile bool
+       AutoTossNoFreq bool
+       AutoTossNoExec bool
+       AutoTossNoTrns bool
 }
 
 func (ctx *Ctx) CallNode(
@@ -84,11 +92,11 @@ func (ctx *Ctx) CallNode(
                                "txspeed":  state.TxSpeed,
                        }, "")
                        isGood = true
-                       conn.Close()
+                       conn.Close() // #nosec G104
                        break
                } else {
                        ctx.LogE("call-start", sds, err, "")
-                       conn.Close()
+                       conn.Close() // #nosec G104
                }
        }
        return