summaryrefslogtreecommitdiff
path: root/src/pool.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-26 16:52:41 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-26 16:52:41 +0100
commit4574c30fcfd3b03bab9a368a6ff2928af7e11e28 (patch)
tree31112a34e89d39a51d6ed6f83e13978b69d97aa9 /src/pool.cc
parent1fad2ec7c135ebe87bb34838f21adaac720dda03 (diff)
downloadfork-ledger-4574c30fcfd3b03bab9a368a6ff2928af7e11e28.tar.gz
fork-ledger-4574c30fcfd3b03bab9a368a6ff2928af7e11e28.tar.bz2
fork-ledger-4574c30fcfd3b03bab9a368a6ff2928af7e11e28.zip
The --download option is now fully restored
Diffstat (limited to 'src/pool.cc')
-rw-r--r--src/pool.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pool.cc b/src/pool.cc
index 48dd7f84..e21b900c 100644
--- a/src/pool.cc
+++ b/src/pool.cc
@@ -35,12 +35,14 @@
#include "commodity.h"
#include "annotate.h"
#include "pool.h"
+#include "quotes.h"
namespace ledger {
commodity_pool_t::commodity_pool_t()
: default_commodity(NULL), keep_base(false),
- quote_leeway(86400), get_quotes(false)
+ quote_leeway(86400), get_quotes(false),
+ get_commodity_quote(commodity_quote_from_script)
{
TRACE_CTOR(commodity_pool_t, "");
null_commodity = create("");
@@ -311,8 +313,11 @@ optional<price_point_t> commodity_pool_t::parse_price_directive(char * line)
point.price.parse(symbol_and_price);
VERIFY(point.price.valid());
+ DEBUG("commodity.download", "Looking up symbol: " << symbol);
if (commodity_t * commodity =
amount_t::current_pool->find_or_create(symbol)) {
+ DEBUG("commodity.download", "Adding price for " << symbol << ": "
+ << point.when << " " << point.price);
commodity->add_price(point.when, point.price, true);
commodity->add_flags(COMMODITY_KNOWN);
return point;