summaryrefslogtreecommitdiff
path: root/methods/rsh.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:57:09 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:57:09 +0000
commit63b1700fd93787682eedc95546a0364f449f036d (patch)
tree169f8b47dc4c88d3fbcaf8ae996e6ca08350dc2d /methods/rsh.cc
parent784202a271ae7e303aacbe226bb87fed50a16f81 (diff)
More SHA-1 prep
Author: jgg Date: 2001-03-06 07:15:29 GMT More SHA-1 prep
Diffstat (limited to 'methods/rsh.cc')
-rw-r--r--methods/rsh.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 9e521edec..5326e5098 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: rsh.cc,v 1.2 2001/02/20 07:03:18 jgg Exp $
+// $Id: rsh.cc,v 1.3 2001/03/06 07:15:29 jgg Exp $
/* ######################################################################
RSH method - Transfer files via rsh compatible program
@@ -271,7 +271,7 @@ bool RSHConn::ModTime(const char *Path, time_t &Time)
// ---------------------------------------------------------------------
/* */
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;
@@ -284,7 +284,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
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;
}
@@ -323,7 +323,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long Resume,
}
MyLen += Res;
- MD5.Add(Buffer,Res);
+ Hash.Add(Buffer,Res);
if (To.Write(Buffer,Res) == false)
{
Close();
@@ -428,7 +428,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
}
// Open the file
- MD5Summation MD5;
+ Hashes Hash;
{
FileFd Fd(Itm->DestFile,FileFd::WriteAny);
if (_error->PendingError() == true)
@@ -441,7 +441,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
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();
@@ -462,7 +462,7 @@ bool RSHMethod::Fetch(FetchItem *Itm)
}
Res.LastModified = FailTime;
- Res.MD5Sum = MD5.Result();
+ Res.MD5Sum = Hash.MD5.Result();
// Timestamp
struct utimbuf UBuf;