]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
bunch of micro-optimizations for depcache
[apt.git] / methods / http.cc
index e4773b0e245a924bc4440352406b0101b4472987..ce697a338f494cdfcbfbefa2fa90de58bb175ed3 100644 (file)
@@ -447,7 +447,7 @@ bool HttpServerState::RunData(FileFd * const File)
       else if (JunkSize != 0)
         In.Limit(JunkSize);
       else
-        In.Limit(Size - StartPos);
+        In.Limit(DownloadSize);
       
       // Just transfer the whole block.
       do
@@ -484,16 +484,14 @@ APT_PURE bool HttpServerState::IsOpen()                                   /*{{{*/
    return (ServerFd != -1);
 }
                                                                        /*}}}*/
-bool HttpServerState::InitHashes(FileFd &File, HashStringList const &ExpectedHashes)/*{{{*/
+bool HttpServerState::InitHashes(HashStringList const &ExpectedHashes) /*{{{*/
 {
    delete In.Hash;
    In.Hash = new Hashes(ExpectedHashes);
-
-   // Set the expected size and read file for the hashes
-   File.Truncate(StartPos);
-   return In.Hash->AddFD(File, StartPos);
+   return true;
 }
                                                                        /*}}}*/
+
 APT_PURE Hashes * HttpServerState::GetHashes()                         /*{{{*/
 {
    return In.Hash;