]> source.dussan.org Git - rspamd.git/commitdiff
Add compatibility with old sqlite.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 23:33:31 +0000 (23:33 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 23:33:31 +0000 (23:33 +0000)
src/libserver/fuzzy_backend.c

index 6f39561c61133889114ae9af1bfb897e26bad0b9..aa011fc9245f08a7e3c7d33190215332316f7319 100644 (file)
@@ -247,8 +247,8 @@ rspamd_fuzzy_backend_create_db (const gchar *path, gboolean add_index,
                        SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_NOMUTEX, NULL))
                        != SQLITE_OK) {
                g_set_error (err, rspamd_fuzzy_backend_quark (),
-                               rc, "Cannot open sqlite db %s: %s",
-                               path, sqlite3_errstr (rc));
+                               rc, "Cannot open sqlite db %s: %d",
+                               path, rc);
 
                return NULL;
        }
@@ -482,7 +482,7 @@ rspamd_fuzzy_backend_close (struct rspamd_fuzzy_backend *backend)
        if (backend != NULL) {
                if (backend->db != NULL) {
                        rspamd_fuzzy_backend_close_stmts (backend);
-                       sqlite3_close_v2 (backend->db);
+                       sqlite3_close (backend->db);
                }
 
                if (backend->path != NULL) {