]> git.saurik.com Git - apt.git/blobdiff - methods/rsh.cc
cleanup the hash iteration. unfortunately there is no 1:1 mapping from Hashes::Suppor...
[apt.git] / methods / rsh.cc
index add128c49741c4135681d6e4f52870cbffff830c..fb3782314d2152bd4e2378fda6178b04581b2d9b 100644 (file)
@@ -14,6 +14,9 @@
 #include <config.h>
 
 #include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/configuration.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -39,7 +42,9 @@ int RSHMethod::FailFd = -1;
 // ---------------------------------------------------------------------
 /* */
 RSHConn::RSHConn(URI Srv) : Len(0), WriteFd(-1), ReadFd(-1),
-                            ServerName(Srv), Process(-1) {}
+                            ServerName(Srv), Process(-1) {
+   Buffer[0] = '\0';
+}
                                                                        /*}}}*/
 // RSHConn::RSHConn - Destructor                                       /*{{{*/
 // ---------------------------------------------------------------------
@@ -302,7 +307,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long long Resume,
       return false;
 
    if (Resume != 0) {
-      if (Hash.AddFD(To.Fd(),Resume) == false) {
+      if (Hash.AddFD(To,Resume) == false) {
         _error->Errno("read",_("Problem hashing file"));
         return false;
       }