mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Do not try to bind to statements that might not be available when preparing the database failed.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -263,6 +263,13 @@ int gravityDB_count(const unsigned char list)
|
||||
|
||||
static bool domain_in_list(const char *domain, sqlite3_stmt* stmt)
|
||||
{
|
||||
// Do not try to bind text to statement when database is not available
|
||||
if(!gravity_database_avail)
|
||||
{
|
||||
logg("domain_in_list(%s): Gravity database not available", domain);
|
||||
return false;
|
||||
}
|
||||
|
||||
int retval;
|
||||
// Bind domain to prepared statement
|
||||
// SQLITE_STATIC: Use the string without first duplicating it internally.
|
||||
|
||||
Reference in New Issue
Block a user