Moved call to DeleteOldShowsByFeedL to when a feed is listed. This prevents a race condition which likely caused symbian1
authorteknolog
Tue, 11 May 2010 22:27:35 +0100
branchsymbian1
changeset 88 f4b512d870e8
parent 87 f0de05da6d65
child 90 d0c0c3e6f7a1
Moved call to DeleteOldShowsByFeedL to when a feed is listed. This prevents a race condition which likely caused
application/inc/buildno.h
application/sis/buildno.txt
application/sis/podcatcher_udeb.pkg
application/sis/podcatcher_udeb.sis
application/sis/podcatcher_udeb_signed.sis
application/sis/podcatcher_urel.pkg
engine/src/FeedEngine.cpp
engine/src/FeedParser.cpp
engine/src/PodcastModel.cpp
--- a/application/inc/buildno.h	Tue May 11 21:41:14 2010 +0100
+++ b/application/inc/buildno.h	Tue May 11 22:27:35 2010 +0100
@@ -1,2 +1,2 @@
 // Build number generated by increment_buildno.py, do not edit manually
-#define BUILD_NO 21
\ No newline at end of file
+#define BUILD_NO 22
\ No newline at end of file
--- a/application/sis/buildno.txt	Tue May 11 21:41:14 2010 +0100
+++ b/application/sis/buildno.txt	Tue May 11 22:27:35 2010 +0100
@@ -1,1 +1,1 @@
-21
\ No newline at end of file
+22
\ No newline at end of file
--- a/application/sis/podcatcher_udeb.pkg	Tue May 11 21:41:14 2010 +0100
+++ b/application/sis/podcatcher_udeb.pkg	Tue May 11 22:27:35 2010 +0100
@@ -1,7 +1,7 @@
 &EN
 :"Symbian Foundation"
 %{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 21, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 22, TYPE=SA
 
 ;Supports S60 3rd edition
 [0x101F7961], 0, 0, 0, {"Series60ProductID"}
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
--- a/application/sis/podcatcher_urel.pkg	Tue May 11 21:41:14 2010 +0100
+++ b/application/sis/podcatcher_urel.pkg	Tue May 11 22:27:35 2010 +0100
@@ -1,7 +1,7 @@
 &EN
 :"Symbian Foundation"
 %{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 21, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 22, TYPE=SA
 
 ;Supports S60 3rd edition
 [0x101F7961], 0, 0, 0, {"Series60ProductID"}
--- a/engine/src/FeedEngine.cpp	Tue May 11 21:41:14 2010 +0100
+++ b/engine/src/FeedEngine.cpp	Tue May 11 22:27:35 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	Tue May 11 21:41:14 2010 +0100
+++ b/engine/src/FeedParser.cpp	Tue May 11 22:27:35 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	Tue May 11 21:41:14 2010 +0100
+++ b/engine/src/PodcastModel.cpp	Tue May 11 22:27:35 2010 +0100
@@ -435,6 +435,7 @@
 EXPORT_C void CPodcastModel::GetShowsByFeedL(TUint aFeedUid)
 	{
 	iActiveShowList.ResetAndDestroy();
+	iShowEngine->DeleteOldShowsByFeedL(aFeedUid);
 	iShowEngine->CheckForDeletedShows(aFeedUid);
 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
 	}