Likely fix for bug 2434.
authorteknolog
Tue, 11 May 2010 22:34:56 +0100
changeset 89 9d854792013a
parent 84 fbb6c20a24b5
Likely fix for bug 2434.
engine/src/FeedEngine.cpp
engine/src/FeedParser.cpp
engine/src/PodcastModel.cpp
--- a/engine/src/FeedEngine.cpp	Wed May 05 10:50:52 2010 +0100
+++ b/engine/src/FeedEngine.cpp	Tue May 11 22:34:56 2010 +0100
@@ -592,11 +592,7 @@
 							iActiveFeed->SetLastError(parserErr);
 							DP1("CFeedEngine::Complete()\t Failed to parse feed. Leave with error code=%d", parserErr);
 							}
-						else
-							{
-							iPodcastModel.ShowEngine().DeleteOldShowsByFeedL(iActiveFeed->Uid());
-							}
-	
+
 						// delete the downloaded XML file as it is no longer needed
 						BaflUtils::DeleteFile(iPodcastModel.FsSession(),iUpdatingFeedFileName);			
 	
--- a/engine/src/FeedParser.cpp	Wed May 05 10:50:52 2010 +0100
+++ b/engine/src/FeedParser.cpp	Tue May 11 22:34:56 2010 +0100
@@ -281,8 +281,8 @@
 				iActiveShow = NULL;
 				
 				iItemsParsed++;
-				//DP2("iItemsParsed: %d, iMaxItems: %d", iItemsParsed, iMaxItems);
-				if (iItemsParsed > iMaxItems) 
+				DP2("iItemsParsed: %d, iMaxItems: %d", iItemsParsed, iMaxItems);
+				if (iItemsParsed >= iMaxItems) 
 					{
 					iStoppedParsing = ETrue;
 					DP("*** Too many items, aborting parsing");
--- a/engine/src/PodcastModel.cpp	Wed May 05 10:50:52 2010 +0100
+++ b/engine/src/PodcastModel.cpp	Tue May 11 22:34:56 2010 +0100
@@ -439,6 +439,7 @@
 EXPORT_C void CPodcastModel::GetShowsByFeedL(TUint aFeedUid)
 	{
 	iActiveShowList.ResetAndDestroy();
+	iShowEngine->DeleteOldShowsByFeedL(aFeedUid);
 	iShowEngine->CheckForDeletedShows(aFeedUid);
 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
 	}