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.
fprintf(stdout, "Error opening database %s\n", argv[4]);
exit(1);
}
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(?, ?, ?, ?, ?)",
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(?, ?, ?, ?, ?)",