diff options
author | Franklin Wei <me@fwei.tk> | 2018-06-27 18:27:28 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-06-27 18:27:28 -0400 |
commit | 3b232072565e54293466f8ba477547686be578bd (patch) | |
tree | d969b39134014d4b38148d449a7c8d8120ef6f59 /service_provider.c | |
parent | 7c71372ec3a6a5b67e59feceeb9df23150ba77e9 (diff) | |
download | csaa-3b232072565e54293466f8ba477547686be578bd.zip csaa-3b232072565e54293466f8ba477547686be578bd.tar.gz csaa-3b232072565e54293466f8ba477547686be578bd.tar.bz2 csaa-3b232072565e54293466f8ba477547686be578bd.tar.xz |
Further work on conversion to database backend; still not working yet
Diffstat (limited to 'service_provider.c')
-rw-r--r-- | service_provider.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/service_provider.c b/service_provider.c index baa8f88..2e119b6 100644 --- a/service_provider.c +++ b/service_provider.c @@ -183,7 +183,7 @@ struct service_provider *sp_new(const void *key, size_t keylen, int logleaves) i - 1, i, i + 1, &hmac); - //assert(eq.type == EQ); + assert(eq.type == EQ); /* update previous leaf's index */ iomt_update_leaf_nextidx(sp->iomt, i - 1, i + 1); @@ -193,7 +193,7 @@ struct service_provider *sp_new(const void *key, size_t keylen, int logleaves) * next node, if any */ iomt_update_leaf_full(sp->iomt, i, i + 1, 1, hash_null); - //assert(tm_set_equiv_root(sp->tm, &eq, hmac)); + assert(tm_set_equiv_root(sp->tm, &eq, hmac)); } return sp; @@ -334,6 +334,8 @@ static int count_versions(struct service_provider *sp, sqlite3_prepare_v2(handle, sql, -1, &st, 0); sqlite3_bind_int(st, 1, file_idx); + assert(sqlite3_step(st) == SQLITE_ROW); + /* praying it works */ return sqlite3_column_int(st, 0); } |