Updated the Blockinator code to avoid using fcntl() on NFS. No file-locking is required when opening the file in read-only mode.
This commit is contained in:
parent
b6aa85cf7a
commit
8f6a30afba
|
@ -121,7 +121,7 @@ static void mod_blockinator_init_handler(apr_pool_t *p, server_rec *s)
|
||||||
sprintf(sqlite3_instr_extension, "%s/sqlite_instr/instr.sqlext", cfg->basepath);
|
sprintf(sqlite3_instr_extension, "%s/sqlite_instr/instr.sqlext", cfg->basepath);
|
||||||
|
|
||||||
/* Open the SQLite DB */
|
/* Open the SQLite DB */
|
||||||
if (sqlite3_open_v2(cfg->db, &db, SQLITE_OPEN_READONLY, NULL)) {
|
if (sqlite3_open_v2(cfg->db, &db, SQLITE_OPEN_READONLY, "unix-none")) {
|
||||||
/* Error. */
|
/* Error. */
|
||||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_blockinator: SQLite error (%s). Could not open database.", sqlite3_errmsg(db));
|
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_blockinator: SQLite error (%s). Could not open database.", sqlite3_errmsg(db));
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ C{
|
||||||
|
|
||||||
if (!init) {
|
if (!init) {
|
||||||
/* Open the SQLite DB */
|
/* Open the SQLite DB */
|
||||||
if (sqlite3_open_v2(BLOCKLIST_DB, &db, SQLITE_OPEN_READONLY, NULL)) {
|
if (sqlite3_open_v2(BLOCKLIST_DB, &db, SQLITE_OPEN_READONLY, "unix-none")) {
|
||||||
syslog(LOG_ERR, "SQLite error (%s). Could not open database.", sqlite3_errmsg(db));
|
syslog(LOG_ERR, "SQLite error (%s). Could not open database.", sqlite3_errmsg(db));
|
||||||
}
|
}
|
||||||
init = 1;
|
init = 1;
|
||||||
|
|
Loading…
Reference in a new issue