summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-method.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:53 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:53 +0000
commit5cb5d8dc4318227ca3ec8976f67e8cfd2302d1ff (patch)
tree026fae4811ede2b7fc28773a8f4ef3042007fab8 /apt-pkg/acquire-method.cc
parentf01fe790891daf085b3a16ce8be3498fcc329d6e (diff)
HTTP pipelining
Author: jgg Date: 1998-12-05 04:19:01 GMT HTTP pipelining
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r--apt-pkg/acquire-method.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index b0176d3cb..8b1de6fb3 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-method.cc,v 1.13 1998/12/05 01:45:19 jgg Exp $
+// $Id: acquire-method.cc,v 1.14 1998/12/05 04:19:01 jgg Exp $
/* ######################################################################
Acquire Method
@@ -47,8 +47,9 @@ pkgAcqMethod::pkgAcqMethod(const char *Ver,unsigned long Flags)
exit(100);
SetNonBlock(STDIN_FILENO,true);
-
+
Queue = 0;
+ QueueBack = 0;
}
/*}}}*/
// AcqMethod::Fail - A fetch has failed /*{{{*/
@@ -78,6 +79,8 @@ void pkgAcqMethod::Fail(string Err,bool Transient)
FetchItem *Tmp = Queue;
Queue = Queue->Next;
delete Tmp;
+ if (Tmp == QueueBack)
+ QueueBack = Queue;
}
else
snprintf(S,sizeof(S),"400 URI Failure\nURI: <UNKNOWN>\n"
@@ -183,6 +186,8 @@ void pkgAcqMethod::URIDone(FetchResult &Res, FetchResult *Alt)
FetchItem *Tmp = Queue;
Queue = Queue->Next;
delete Tmp;
+ if (Tmp == QueueBack)
+ QueueBack = Queue;
}
/*}}}*/
// AcqMethod::MediaFail - Syncronous request for new media /*{{{*/
@@ -328,7 +333,9 @@ int pkgAcqMethod::Run(bool Single)
FetchItem **I = &Queue;
for (; *I != 0; I = &(*I)->Next);
*I = Tmp;
-
+ if (QueueBack == 0)
+ QueueBack = Tmp;
+
// Notify that this item is to be fetched.
if (Fetch(Tmp) == false)
Fail();