// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: rsh.cc,v 1.2 2001/02/20 07:03:18 jgg Exp $
+// $Id: rsh.cc,v 1.4 2001/03/13 06:51:46 jgg Exp $
/* ######################################################################
RSH method - Transfer files via rsh compatible program
// ---------------------------------------------------------------------
/* */
bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
- MD5Summation &MD5,bool &Missing, unsigned long Size)
+ Hashes &Hash,bool &Missing, unsigned long Size)
{
Missing = false;
return false;
if (Resume != 0) {
- if (MD5.AddFD(To.Fd(),Resume) == false) {
+ if (Hash.AddFD(To.Fd(),Resume) == false) {
_error->Errno("read","Problem hashing file");
return false;
}
}
MyLen += Res;
- MD5.Add(Buffer,Res);
+ Hash.Add(Buffer,Res);
if (To.Write(Buffer,Res) == false)
{
Close();
}
// Open the file
- MD5Summation MD5;
+ Hashes Hash;
{
FileFd Fd(Itm->DestFile,FileFd::WriteAny);
if (_error->PendingError() == true)
FailFd = Fd.Fd();
bool Missing;
- if (Server->Get(File,Fd,Res.ResumePoint,MD5,Missing,Res.Size) == false)
+ if (Server->Get(File,Fd,Res.ResumePoint,Hash,Missing,Res.Size) == false)
{
Fd.Close();
}
Res.LastModified = FailTime;
- Res.MD5Sum = MD5.Result();
+ Res.TakeHashes(Hash);
// Timestamp
struct utimbuf UBuf;