summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2007-04-05 11:00:45 +0000
committerpixel <pixel>2007-04-05 11:00:45 +0000
commitff8044bf348ed8a786cb8857077b57ccef87cdd6 (patch)
treef3b29ef4b0d05786a9490c87eca441a32cb40f65
parentc333001750bf29cb34c5b52abd9572563943c1e5 (diff)
Bug fixes in HttpClient: no more double buffering needed.
-rw-r--r--lib/HttpClient.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/HttpClient.cc b/lib/HttpClient.cc
index f516fbb..ceca3d5 100644
--- a/lib/HttpClient.cc
+++ b/lib/HttpClient.cc
@@ -98,7 +98,7 @@ int HttpClient::Do() throw (GeneralException) {
Suspend(TASK_ON_HOLD);
}
-#if 1
+#if 0
c = new CopyJob(&Client, &b);
current = 4;
WaitFor(c);
@@ -134,7 +134,7 @@ int HttpClient::Do() throw (GeneralException) {
case 4:
if (c)
delete c;
- printm(M_INFO, "Creating readjob for number header.\n");
+// printm(M_INFO, "Creating readjob for number header.\n");
c = new ReadJob(&Client, &b, any);
WaitFor(c);
current = 5;
@@ -145,24 +145,23 @@ int HttpClient::Do() throw (GeneralException) {
b >> t;
if (t.strlen() == 0) {
current = 4;
- printm(M_INFO, "String is empty, looping.\n");
- c = new ReadJob(&Client, &b, any);
- WaitFor(c);
- Suspend(TASK_ON_HOLD);
+// printm(M_INFO, "String is empty, looping.\n");
+ c = 0;
+ Suspend(TASK_BURST);
}
- printm(M_INFO, "Read string: " + t + "\n");
+// printm(M_INFO, "Read string: " + t + "\n");
- t.scanf("%x", &l);
+ l = t.to_int("%x");
- printm(M_INFO, "Read chunk length: " + String(l) + "\n");
+// printm(M_INFO, "Read chunk length: " + String(l) + "\n");
if (l == 0) {
status = "Downloaded.";
return TASK_DONE;
}
- printm(M_INFO, "Creating copyjob to download chunk.\n");
+// printm(M_INFO, "Creating copyjob to download chunk.\n");
c = new CopyJob(&Client, out, l);
WaitFor(c);