summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);