core: Consolidate default global setting values in one place.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
12
src/ssb.db.c
12
src/ssb.db.c
@ -2046,6 +2046,10 @@ bool tf_ssb_db_get_global_setting_bool(sqlite3* db, const char* name, bool* out_
|
||||
{
|
||||
tf_printf("prepare failed: %s\n", sqlite3_errmsg(db));
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
*out_value = tf_util_get_default_global_setting_bool(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -2069,6 +2073,10 @@ bool tf_ssb_db_get_global_setting_int64(sqlite3* db, const char* name, int64_t*
|
||||
{
|
||||
tf_printf("prepare failed: %s\n", sqlite3_errmsg(db));
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
*out_value = tf_util_get_default_global_setting_int(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -2092,6 +2100,10 @@ bool tf_ssb_db_get_global_setting_string(sqlite3* db, const char* name, char* ou
|
||||
{
|
||||
tf_printf("prepare failed: %s\n", sqlite3_errmsg(db));
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
snprintf(out_value, size, "%s", tf_util_get_default_global_setting_string(name));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user