[darwinbuild-changes] [758] branches/PR-7593824/darwinup/DB.cpp

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 10 14:15:01 PST 2010


Revision: 758
          http://trac.macosforge.org/projects/darwinbuild/changeset/758
Author:   wsiegrist at apple.com
Date:     2010-03-10 14:15:01 -0800 (Wed, 10 Mar 2010)
Log Message:
-----------
Fix stale cache bug due to naming both archive keyword queries the same.

Modified Paths:
--------------
    branches/PR-7593824/darwinup/DB.cpp

Modified: branches/PR-7593824/darwinup/DB.cpp
===================================================================
--- branches/PR-7593824/darwinup/DB.cpp	2010-03-10 21:07:33 UTC (rev 757)
+++ branches/PR-7593824/darwinup/DB.cpp	2010-03-10 22:15:01 UTC (rev 758)
@@ -469,12 +469,14 @@
 int DarwinupDatabase::get_archive(uint8_t** data, archive_keyword_t keyword) {
 	int res = SQLITE_OK;
 	int order = ORDER_BY_DESC;
+	const char* name = "archive_newest";
 
 	if (keyword == DEPOT_ARCHIVE_OLDEST) {
 		order = ORDER_BY_ASC;
+		name = "archive_oldest";
 	}
 	
-	res = this->get_row_ordered("archive__keyword",
+	res = this->get_row_ordered(name,
 								data,
 								this->m_archives_table,
 								this->m_archives_table->column(3), // order by date_added
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20100310/49158004/attachment.html>


More information about the darwinbuild-changes mailing list