# HG changeset patch # User Sebastian Brannstrom # Date 1290207170 0 # Node ID 29e27755982016331e2eaf8bf030412bfd392ed0 # Parent 74d6fb4058355fcc7fc74330f306575154ec73ac Fix for autodelete issues diff -r 74d6fb405835 -r 29e277559820 engine/src/HttpClient.cpp --- a/engine/src/HttpClient.cpp Fri Nov 19 22:52:12 2010 +0000 +++ b/engine/src/HttpClient.cpp Fri Nov 19 22:52:50 2010 +0000 @@ -198,7 +198,7 @@ } TBool CHttpClient::GetL(const TDesC& aUrl, const TDesC& aFileName, TBool aSilent) { - DP("CHttpClient::Get START"); + DP("CHttpClient::GetL START"); DP2("Getting '%S' to '%S'", &aUrl, &aFileName); if (iIsActive) diff -r 74d6fb405835 -r 29e277559820 engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Fri Nov 19 22:52:12 2010 +0000 +++ b/engine/src/ShowEngine.cpp Fri Nov 19 22:52:50 2010 +0000 @@ -554,6 +554,23 @@ { User::Leave(KErrCorrupt); } + + // now update DB + _LIT(KSqlStatement2, "update shows set downloadstate=%d and deletedate = 0 where downloadstate=%d and deletedate != 0 and deletedate < \"%Ld\""); + iSqlBuffer.Format(KSqlStatement2, ENotDownloaded, EDownloaded, now.Int64()); + + + rc = sqlite3_prepare16_v2(&iDB, (const void*) iSqlBuffer.PtrZ(), -1, + &st, (const void**) NULL); + + if (rc == SQLITE_OK) + { + rc = sqlite3_step(st); + Cleanup_sqlite3_finalize_PushL(st); + CleanupStack::PopAndDestroy();//st + } + + DP("CShowEngine::DBGetOldShowsL END"); } @@ -1680,6 +1697,7 @@ deleteDate.HomeTime(); deleteDate += daysAhead; aShow->SetDeleteDate(deleteDate); + DP2("Setting show %S to be deleted on the %d th", &aShow->Title(), deleteDate.DayNoInMonth()); } UpdateShowL(*aShow);