/*
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
int64(src.Len()),
int64(padSize),
src,
+ "pktName",
)
if err != nil {
return false
return false
}
txJob := sentJobs[0]
- defer txJob.Fd.Close()
+ fd, err := os.Open(txJob.Path)
+ if err != nil {
+ panic(err)
+ }
+ defer fd.Close()
var bufR bytes.Buffer
- if _, err = io.Copy(&bufR, txJob.Fd); err != nil {
+ if _, err = io.Copy(&bufR, fd); err != nil {
panic(err)
}
var bufW bytes.Buffer