From 3cc244db96e24f7cf5b74162dcd2897cab822e5e Mon Sep 17 00:00:00 2001 From: Aiwota Programmer Date: Sun, 5 Jul 2009 06:22:26 +0900 Subject: [PATCH] Restrain trace messages. --- src/board_window.cxx | 8 +++++++- src/thread_idx_cache.cxx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/board_window.cxx b/src/board_window.cxx index b450b2a..5e02c53 100644 --- a/src/board_window.cxx +++ b/src/board_window.cxx @@ -243,7 +243,10 @@ void BoardWindow::merge_subject_txt( boost::posix_time::ptime last_modified; try { - last_modified = rfc1123_to_ptime(idx_.last_modified_); + if (!idx_.last_modified_.empty()) + last_modified = rfc1123_to_ptime(idx_.last_modified_); + else + last_modified = boost::posix_time::second_clock::universal_time(); } catch (const HTTPDateError& e) { std::cerr << e.what() << std::endl; last_modified = boost::posix_time::second_clock::universal_time(); @@ -256,6 +259,9 @@ void BoardWindow::merge_subject_txt( model_column::field(cols) = item.id_; model_column::field(cols) = item.res_num_; + // avoid some threads like '9242006007' + if (item.id_.size() == 10 && item.id_[0] == '9') continue; + try { const std::time_t _start = boost::lexical_cast(item.id_); const boost::posix_time::ptime start = boost::posix_time::from_time_t(_start); diff --git a/src/thread_idx_cache.cxx b/src/thread_idx_cache.cxx index 9dea8e5..668a67e 100644 --- a/src/thread_idx_cache.cxx +++ b/src/thread_idx_cache.cxx @@ -170,7 +170,7 @@ void ThreadIdxCache::merge_idx(const boost::filesystem::path& idx_dir, if (last_modified <= cache_last_modified) continue; } - std::cout << "modified:" << id << std::endl; +// std::cout << "modified:" << id << std::endl; ThreadIdx idx = ThreadIdx::from_xml(leaf); if (idx.last_modified_.empty()) continue; ThreadIdxCache& cache = caches[id]; -- 2.11.0