summaryrefslogtreecommitdiff
path: root/data/apt/cfnetwork.diff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2009-04-15 21:56:57 +0000
committerJay Freeman <saurik@saurik.com>2009-04-15 21:56:57 +0000
commitd17a5ee06c0c2960d319d4cc3ea9b0c04896d125 (patch)
tree5f43c099dcfe5d506dd153d71e76b5e48ce60c53 /data/apt/cfnetwork.diff
parent7aaf9e3588662f4d7e50434b4c41a15ad49b5b45 (diff)
Upgraded to APT 0.7.
git-svn-id: http://svn.telesphoreo.org/trunk@589 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/apt/cfnetwork.diff')
-rw-r--r--data/apt/cfnetwork.diff59
1 files changed, 36 insertions, 23 deletions
diff --git a/data/apt/cfnetwork.diff b/data/apt/cfnetwork.diff
index 525a559d5..1639ab7c7 100644
--- a/data/apt/cfnetwork.diff
+++ b/data/apt/cfnetwork.diff
@@ -1,7 +1,7 @@
-diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
---- apt-0.6.46.4.1/methods/http.cc 2006-12-04 14:37:36.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/methods/http.cc 2009-01-21 10:11:37.000000000 +0000
-@@ -30,6 +36,7 @@
+diff -ru apt-0.7.20.2/methods/http.cc apt-0.7.20.2+iPhone/methods/http.cc
+--- apt-0.7.20.2/methods/http.cc 2009-02-07 15:09:35.000000000 +0000
++++ apt-0.7.20.2+iPhone/methods/http.cc 2009-04-14 16:34:31.000000000 +0000
+@@ -30,6 +30,7 @@
#include <apt-pkg/error.h>
#include <apt-pkg/hashes.h>
@@ -9,7 +9,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
#include <sys/stat.h>
#include <sys/time.h>
#include <utime.h>
-@@ -40,9 +47,16 @@
+@@ -40,9 +41,16 @@
#include <string.h>
#include <iostream>
#include <apti18n.h>
@@ -24,9 +24,9 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
+#include <CoreServices/CoreServices.h>
+#include <SystemConfiguration/SystemConfiguration.h>
+ #include "config.h"
#include "connect.h"
- #include "rfc2553emu.h"
-@@ -51,6 +65,51 @@
+@@ -52,6 +60,51 @@
/*}}}*/
using namespace std;
@@ -78,7 +78,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
string HttpMethod::FailFile;
int HttpMethod::FailFd = -1;
time_t HttpMethod::FailTime = 0;
-@@ -630,6 +689,51 @@
+@@ -632,6 +685,51 @@
}
/*}}}*/
@@ -130,7 +130,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
// HttpMethod::SendReq - Send the HTTP request /*{{{*/
// ---------------------------------------------------------------------
/* This places the http request in the outbound buffer */
-@@ -1043,6 +1147,8 @@
+@@ -1043,6 +1141,8 @@
signal(SIGINT,SigTerm);
Server = 0;
@@ -139,18 +139,16 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
int FailCounter = 0;
while (1)
-@@ -1062,159 +1168,314 @@
-
+@@ -1063,173 +1163,313 @@
if (Queue == 0)
continue;
--
+
- // Connect to the server
- if (Server == 0 || Server->Comp(Queue->Uri) == false)
- {
- delete Server;
- Server = new ServerState(Queue->Uri,this);
- }
--
- /* If the server has explicitly said this is the last connection
- then we pre-emptively shut down the pipeline and tear down
- the connection. This will speed up HTTP/1.0 servers a tad
@@ -171,6 +169,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- Server = 0;
- continue;
- }
++ CFStringEncoding se = kCFStringEncodingUTF8;
- // Fill the pipeline.
- Fetch(0);
@@ -209,8 +208,6 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- continue;
- }
- };
-+ CFStringEncoding se = kCFStringEncodingUTF8;
-+
+ char *url = strdup(Queue->Uri.c_str());
+ url:
+ URI uri = std::string(url);
@@ -511,8 +508,24 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
- URIDone(Res);
- }
- else
-- Fail(true);
--
+- {
+- if (Server->ServerFd == -1)
+- {
+- FailCounter++;
+- _error->Discard();
+- Server->Close();
+-
+- if (FailCounter >= 2)
+- {
+- Fail(_("Connection failed"),true);
+- FailCounter = 0;
+- }
+-
+- QueueBack = Queue;
+- }
+- else
+- Fail(true);
+- }
- break;
- }
-
@@ -593,7 +606,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
FailCounter = 0;
}
-@@ -1224,6 +1484,34 @@
+@@ -1242,6 +1482,34 @@
setlocale(LC_ALL, "");
HttpMethod Mth;
@@ -628,15 +641,15 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc
return Mth.Loop();
}
-diff -ru apt-0.6.46.4.1/methods/makefile apt-0.6.46.4.1+iPhone/methods/makefile
---- apt-0.6.46.4.1/methods/makefile 2006-12-04 14:37:36.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/methods/makefile 2008-05-11 06:32:33.000000000 +0000
+diff -ru apt-0.7.20.2/methods/makefile apt-0.7.20.2+iPhone/methods/makefile
+--- apt-0.7.20.2/methods/makefile 2009-02-07 15:09:35.000000000 +0000
++++ apt-0.7.20.2+iPhone/methods/makefile 2009-04-14 16:18:18.000000000 +0000
@@ -47,7 +47,7 @@
# The http method
PROGRAM=http
--SLIBS = -lapt-pkg $(SOCKETLIBS)
-+SLIBS = -lapt-pkg $(SOCKETLIBS) -framework CoreFoundation -framework CFNetwork -framework SystemConfiguration -framework IOKit -llockdown
+-SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
++SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -framework CoreFoundation -framework CFNetwork -framework SystemConfiguration -framework IOKit -llockdown
LIB_MAKES = apt-pkg/makefile
SOURCE = http.cc rfc2553emu.cc connect.cc
include $(PROGRAM_H)