--- a/fotaapplication/fotaserver/src/FotaDlMgrClient.cpp Tue Sep 28 17:53:08 2010 +0530
+++ b/fotaapplication/fotaserver/src/FotaDlMgrClient.cpp Fri Oct 15 11:46:45 2010 +0530
@@ -36,7 +36,9 @@
DownloadManagerClient* DownloadManagerClient::NewL(CFotaServer* aServer)
{
DownloadManagerClient* self = new (ELeave) DownloadManagerClient(aServer);
+ CleanupStack::PushL( self );
self->ConstructL();
+ CleanupStack::Pop(self);
return self;
}
@@ -68,21 +70,23 @@
iFs.Close();
- /*
+
+
+ if (iNotifier)
+ {
+ FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifier >>"));
+ delete iNotifier;
+ iNotifier = NULL;
+ FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifier <<"));
+ }
if (iNotifParams)
{
FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifParams >>"));
delete iNotifParams;
iNotifParams = NULL;
FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifParams <<"));
- }
- if (iNotifier)
- {
- FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifier >>"));
- delete iNotifier;
- iNotifier = NULL;
- FLOG(_L("DownloadManagerClient::~DownloadManagerClient, iNotifier <<"));
- }*/
+ }
+
FLOG(_L("DownloadManagerClient::~DownloadManagerClient <<"));
}
@@ -104,7 +108,9 @@
delete centrep;
centrep = NULL;
-
+
+ iNotifier = CFotaDownloadNotifHandler::NewL(this);
+
__LEAVE_IF_ERROR(iFs.Connect());
iProgress = EFalse;
@@ -660,12 +666,7 @@
//No network coverage
iFotaServer->iPackageState.iResult
= RFotaEngineSession::EResDLFailDueToNWIssues;
- }
- else if (err0 >= HttpRestartFailed && err0 <= ContentExpired)
- {
- iFotaServer->iPackageState.iResult
- = RFotaEngineSession::EResUndefinedError;
- }
+ }
else if (err0 == ObjectNotFound)
{
iFotaServer->iPackageState.iResult
@@ -1011,7 +1012,7 @@
FLOG(_L("DownloadManagerClient::ShowDialog, dialogid = %d >>"), adialogid);
iFotaServer->ServerCanShut(EFalse);
if (iFotaServer->FullScreenDialog())
- iFotaServer->FullScreenDialog()->Close();
+ iFotaServer->FullScreenDialog()->close();
if (iFotaServer->iPackageState.iSessionType && adialogid
!= EFwDLNeedMoreMemory)
@@ -1030,20 +1031,12 @@
CleanupStack::PushL(keyParam1);
*keyParam1 = KKeyParam1;
- HBufC* keyParam2 = HBufC::NewL(10);
- CleanupStack::PushL(keyParam2);
- *keyParam2 = KKeyParam2;
-
- HBufC* keyParam3 = HBufC::NewL(10);
- CleanupStack::PushL(keyParam3);
- *keyParam3 = KKeyParam3;
-
//adialogid = EFwUpdResumeUpdate;
CHbSymbianVariant* dialogId = CHbSymbianVariant::NewL(&adialogid,
CHbSymbianVariant::EInt);
- CleanupStack::PushL(dialogId);
+ //CleanupStack::PushL(dialogId);
iNotifParams->Add(*keyDialog, dialogId);
- iNotifier = CFotaDownloadNotifHandler::NewL(this);
+
switch (adialogid)
{
@@ -1078,7 +1071,7 @@
}
break;
}
- CleanupStack::PopAndDestroy(5);
+ CleanupStack::PopAndDestroy(2);
FLOG(_L("DownloadManagerClient::ShowDialog <<"));
}