diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-15 19:32:15 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-15 19:32:15 -0400 |
commit | 2ec9b6a7b24cdd3573a675bc3a27fbd3160ede26 (patch) | |
tree | 50c7de279670cdb8809504c4704393dae7be567f | |
parent | 6bfb4206b15f7b0b9ecef785ee5e01b63142dcf7 (diff) | |
download | fork-ledger-2ec9b6a7b24cdd3573a675bc3a27fbd3160ede26.tar.gz fork-ledger-2ec9b6a7b24cdd3573a675bc3a27fbd3160ede26.tar.bz2 fork-ledger-2ec9b6a7b24cdd3573a675bc3a27fbd3160ede26.zip |
Split up session_t::reread_journal_files()
You now call session_t::close_journal_files() followed by
session_t::read_journal_files().
-rw-r--r-- | src/report.h | 3 | ||||
-rw-r--r-- | src/session.cc | 4 | ||||
-rw-r--r-- | src/session.h | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/report.h b/src/report.h index 06a1e040..73eefd95 100644 --- a/src/report.h +++ b/src/report.h @@ -144,7 +144,8 @@ public: } value_t reload_command(call_scope_t& scope) { - session.reread_journal_files(); + session.close_journal_files(); + session.read_journal_files(); return true; } diff --git a/src/session.cc b/src/session.cc index 52c84acb..5bc7ed8d 100644 --- a/src/session.cc +++ b/src/session.cc @@ -165,7 +165,7 @@ void session_t::read_journal_files() INFO("Found " << count << " entries"); } -void session_t::reread_journal_files() +void session_t::close_journal_files() { journal.reset(); master.reset(); @@ -176,8 +176,6 @@ void session_t::reread_journal_files() amount_t::initialize(commodity_pool); master.reset(new account_t); journal.reset(new journal_t(master.get())); - - read_journal_files(); } void session_t::clean_xacts() diff --git a/src/session.h b/src/session.h index f4937f10..08f93377 100644 --- a/src/session.h +++ b/src/session.h @@ -88,7 +88,7 @@ public: std::size_t read_data(const string& master_account = ""); void read_journal_files(); - void reread_journal_files(); + void close_journal_files(); void clean_xacts(); void clean_xacts(entry_t& entry); |