projects
/
trust_router.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1a27b6
)
Set busy timeout
author
Sam Hartman
<hartmans@debian.org>
Tue, 7 Oct 2014 10:08:55 +0000
(06:08 -0400)
committer
Sam Hartman
<hartmans@debian.org>
Tue, 7 Oct 2014 11:00:34 +0000
(07:00 -0400)
Set a busy timeout in the tids sqlite3 setup code so that we do not
fail on any database locking. As an example in 1.4 if two tids
processes try to write at the same time, one will fail.
tid/example/tids_main.c
patch
|
blob
|
history
diff --git
a/tid/example/tids_main.c
b/tid/example/tids_main.c
index
e920874
..
29a43b8
100644
(file)
--- a/
tid/example/tids_main.c
+++ b/
tid/example/tids_main.c
@@
-276,6
+276,7
@@
int main (int argc,
fprintf(stdout, "Error opening database %s\n", argv[4]);
exit(1);
}
+ sqlite3_busy_timeout( db, 1000);
sqlite3_prepare_v2(db, "insert into psk_keys (keyid, key, client_dh_pub) values(?, ?, ?)",
-1, &insert_stmt, NULL);
sqlite3_prepare_v2(db, "insert into authorizations (client_dh_pub, coi, acceptor_realm, hostname, apc) values(?, ?, ?, ?, ?)",