From ff8044bf348ed8a786cb8857077b57ccef87cdd6 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 5 Apr 2007 11:00:45 +0000 Subject: Bug fixes in HttpClient: no more double buffering needed. --- lib/HttpClient.cc | 19 +++++++++---------- 1 file 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); -- cgit v1.2.3