From c3111912df87159d1c3bccac351f614a25a3c553 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Sat, 27 Sep 2014 20:27:51 +0200 Subject: Fix api problems --- src/plop.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plop.erl b/src/plop.erl index 9ea6aec..c93b26d 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -146,8 +146,8 @@ handle_call({get, logid}, _From, {reply, LogID, Plop}; handle_call({add, {LogEntry, TreeLeafHash, EntryHash}}, _From, Plop) -> - ok = ht:add(TreeLeafHash), {atomic, ok} = db:add(TreeLeafHash, EntryHash, LogEntry, ht:size()), + ok = ht:add(TreeLeafHash), {reply, ok, Plop}; handle_call({sth, Data}, _From, @@ -162,7 +162,7 @@ handle_call({consistency, {First, Second}}, _From, Plop) -> {reply, ht:consistency(First - 1, Second - 1), Plop}; handle_call({inclusion, {Hash, TreeSize}}, _From, Plop) -> - R = case db:get_by_entry_hash(Hash) of + R = case db:get_by_leaf_hash(Hash) of notfound -> {notfound, "Unknown hash"}; % FIXME: include Hash {I, _MTLHash, _Entry} -> -- cgit v1.1