|
@@ -800,15 +800,15 @@ func main() {
|
|
|
log.Printf("[Client->Server copy]\n")
|
|
|
addr := hc.RemoteAddr()
|
|
|
hname := goutmp.GetHost(addr.String())
|
|
|
- logger.LogNotice(fmt.Sprintf("[Running copy for [%s@%s]]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
+ logger.LogNotice(fmt.Sprintf("[c->s copy for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
cmdStatus, runErr := runClientToServerCopyAs(string(rec.Who()), string(rec.TermType()), hc, string(rec.Cmd()), chaffEnabled)
|
|
|
// Returned hopefully via an EOF or exit/logout;
|
|
|
// Clear current op so user can enter next, or EOF
|
|
|
rec.SetOp([]byte{0})
|
|
|
if runErr != nil {
|
|
|
- logger.LogErr(fmt.Sprintf("[Error running cp for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
+ logger.LogErr(fmt.Sprintf("[c->s copy error for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
} else {
|
|
|
- logger.LogNotice(fmt.Sprintf("[Command completed for %s@%s, status %d]\n", rec.Who(), hname, cmdStatus)) // nolint: gosec,errcheck
|
|
|
+ logger.LogNotice(fmt.Sprintf("[c->s copy completed for %s@%s, status %d]\n", rec.Who(), hname, cmdStatus)) // nolint: gosec,errcheck
|
|
|
}
|
|
|
// TODO: Test this with huge files.. see Bug #22 - do we need to
|
|
|
// sync w/sender (client) that we've gotten all data?
|
|
@@ -824,13 +824,13 @@ func main() {
|
|
|
log.Printf("[Server->Client copy]\n")
|
|
|
addr := hc.RemoteAddr()
|
|
|
hname := goutmp.GetHost(addr.String())
|
|
|
- logger.LogNotice(fmt.Sprintf("[Running copy for [%s@%s]]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
+ logger.LogNotice(fmt.Sprintf("[s->c copy for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
cmdStatus, runErr := runServerToClientCopyAs(string(rec.Who()), string(rec.TermType()), hc, string(rec.Cmd()), chaffEnabled)
|
|
|
if runErr != nil {
|
|
|
- logger.LogErr(fmt.Sprintf("[Error spawning cp for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
+ logger.LogErr(fmt.Sprintf("[s->c copy error for %s@%s]\n", rec.Who(), hname)) // nolint: gosec,errcheck
|
|
|
} else {
|
|
|
// Returned hopefully via an EOF or exit/logout;
|
|
|
- logger.LogNotice(fmt.Sprintf("[Command completed for %s@%s, status %d]\n", rec.Who(), hname, cmdStatus)) // nolint: gosec,errcheck
|
|
|
+ logger.LogNotice(fmt.Sprintf("[s->c copy completed for %s@%s, status %d]\n", rec.Who(), hname, cmdStatus)) // nolint: gosec,errcheck
|
|
|
}
|
|
|
// HACK: Bug #22: (xc) Need to wait for rcvr to get final data
|
|
|
// TODO: Await specific msg from client to inform they have gotten all data from the tarpipe
|