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:
Scott Wallace 2012-08-29 10:50:08 +01:00
parent b6aa85cf7a
commit 8f6a30afba
2 changed files with 2 additions and 2 deletions

View file

@ -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);
/* 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. */
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_blockinator: SQLite error (%s). Could not open database.", sqlite3_errmsg(db));
}

View file

@ -19,7 +19,7 @@ C{
if (!init) {
/* 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));
}
init = 1;