diff options
-rw-r--r-- | lib/HttpClient.cc | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/lib/HttpClient.cc b/lib/HttpClient.cc index ceca3d5..b0e9041 100644 --- a/lib/HttpClient.cc +++ b/lib/HttpClient.cc @@ -98,43 +98,11 @@ int HttpClient::Do() throw (GeneralException) { Suspend(TASK_ON_HOLD); } -#if 0 - c = new CopyJob(&Client, &b); - current = 4; - WaitFor(c); - Suspend(TASK_ON_HOLD); - - case 4: - delete c; - - do { - do { - b >> t; - } while (t.strlen() == 0); - - l = t.to_int("%x"); - if (l) - b.copyto(&b2, l); - - } while (l); - - c = new CopyJob(&b2, out); - WaitFor(c); - current = 5; - Suspend(TASK_ON_HOLD); - - case 5: - delete c; - - status = "Downloaded."; - - return TASK_DONE; -#else c = 0; + case 4: if (c) delete c; -// printm(M_INFO, "Creating readjob for number header.\n"); c = new ReadJob(&Client, &b, any); WaitFor(c); current = 5; @@ -145,29 +113,21 @@ int HttpClient::Do() throw (GeneralException) { b >> t; if (t.strlen() == 0) { current = 4; -// printm(M_INFO, "String is empty, looping.\n"); c = 0; Suspend(TASK_BURST); } -// printm(M_INFO, "Read string: " + t + "\n"); - l = t.to_int("%x"); - -// 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"); + } c = new CopyJob(&Client, out, l); WaitFor(c); current = 4; Suspend(TASK_ON_HOLD); -#endif + case 6: delete c; |