Fix to make sure file handle is closed on failed download.
--- a/engine/src/HttpEventHandler.cpp Sun May 02 13:14:23 2010 +0100
+++ b/engine/src/HttpEventHandler.cpp Mon May 03 15:23:15 2010 +0100
@@ -193,12 +193,14 @@
case THTTPEvent::ESucceeded:
{
DP("Transaction Successful");
+ iRespBodyFile.Close();
aTransaction.Close();
iHttpClient->ClientRequestCompleteL(KErrNone);
} break;
case THTTPEvent::EFailed:
{
DP("Transaction Failed");
+ iRespBodyFile.Close();
aTransaction.Close();
if(iLastStatusCode == HTTPStatus::EOk || iLastStatusCode == HTTPStatus::ECreated || iLastStatusCode == HTTPStatus::EAccepted)
@@ -222,6 +224,7 @@
// close off the transaction if it's an error
if (aEvent.iStatus < 0)
{
+ iRespBodyFile.Close();
aTransaction.Close();
iHttpClient->ClientRequestCompleteL(aEvent.iStatus);
}