summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-10-08 16:22:05 +0200
committerLinus Nordberg <linus@nordberg.se>2014-10-08 16:22:05 +0200
commit6ddb0363c5c9bb147f9a4fe0ba683bdba20b5389 (patch)
treec7d8680e61ef0e32a358d199ad98fe838594d085
parente3fd2e3fc202ce18b90ac4ca96ac8264bed79569 (diff)
parent732aaa8f2c2d57e8a5ad989fee0ba7b8c3c82479 (diff)
Merge remote-tracking branch 'refs/remotes/map/fsync4' into origin-master
Conflicts: src/catlfish.erl
-rw-r--r--Makefile3
-rw-r--r--README.md2
-rw-r--r--catlfish.config8
-rw-r--r--src/catlfish.erl2
4 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1170f31..b446536 100644
--- a/Makefile
+++ b/Makefile
@@ -7,10 +7,11 @@ release:
mkdir rel
./makerelease.erl
(cd rel; \
- ln -s ../../plop/Mnesia.nonode@nohost .; \
ln -s ../../plop/test .)
cp httpd_props.conf rel
cp catlfish.config rel
mkdir rel/catlfish
+ mkdir rel/db
+ printf "0" > rel/db/treesize
cp -r webroot rel/catlfish
test -d rel/catlfish/webroot/log || mkdir rel/catlfish/webroot/log
diff --git a/README.md b/README.md
index 7b6f625..21d86e5 100644
--- a/README.md
+++ b/README.md
@@ -15,8 +15,6 @@ A compiled https://github.com/davisp/jiffy (for JSON encoding and decoding) in .
# Start
-Make sure plop has a database. See `plop/README`. Then run catlfish:
-
$ (cd rel ; bin/erl -config catlfish)
# Logs and traces
diff --git a/catlfish.config b/catlfish.config
index cda8789..9b80c6e 100644
--- a/catlfish.config
+++ b/catlfish.config
@@ -9,4 +9,10 @@
{error_logger_mf_maxfiles, 10}]},
{inets,
[{services,
- [{httpd, [{proplist_file, "httpd_props.conf"}]}]}]}].
+ [{httpd, [{proplist_file, "httpd_props.conf"}]}]}]},
+ {plop,
+ [{entry_root_path, "db/certentries/"},
+ {index_path, "db/index"},
+ {entryhash_root_path, "db/entryhash/"},
+ {treesize_path, "db/treesize"},
+ {indexforhash_root_path, "db/certindex/"}]}].
diff --git a/src/catlfish.erl b/src/catlfish.erl
index bd3c106..d105591 100644
--- a/src/catlfish.erl
+++ b/src/catlfish.erl
@@ -146,7 +146,7 @@ unpack_entry(Entry) ->
x_entries([]) ->
[];
x_entries([H|T]) ->
- [_Index, _Hash, Entry] = H,
+ {_Index, _Hash, Entry} = H,
{Timestamp, LeafCertVector, CertChainVector} = unpack_entry(Entry),
MTL = build_mtl(Timestamp, LeafCertVector),
[{[{leaf_input, base64:encode(MTL)}, {extra_data, base64:encode(CertChainVector)}]} |