v0.3.3 - Fix function naming consistency: rename find_existing_nrdb_files to find_existing_db_files
- Update function declaration in config.h - Update function definition in config.c - Update function calls in config.c and main.c - Maintain consistency with .db file extension naming convention This resolves the inconsistency between database file extension (.db) and function names (nrdb)
This commit is contained in:
Binary file not shown.
@@ -33,7 +33,7 @@ static cJSON* g_pending_config_event = NULL;
|
|||||||
// UTILITY FUNCTIONS
|
// UTILITY FUNCTIONS
|
||||||
// ================================
|
// ================================
|
||||||
|
|
||||||
char** find_existing_nrdb_files(void) {
|
char** find_existing_db_files(void) {
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
char **files = NULL;
|
char **files = NULL;
|
||||||
@@ -342,7 +342,7 @@ int get_config_bool(const char* key, int default_value) {
|
|||||||
// ================================
|
// ================================
|
||||||
|
|
||||||
int is_first_time_startup(void) {
|
int is_first_time_startup(void) {
|
||||||
char** existing_files = find_existing_nrdb_files();
|
char** existing_files = find_existing_db_files();
|
||||||
if (existing_files) {
|
if (existing_files) {
|
||||||
// Free the array
|
// Free the array
|
||||||
for (int i = 0; existing_files[i]; i++) {
|
for (int i = 0; existing_files[i]; i++) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ int apply_configuration_from_event(const cJSON* event);
|
|||||||
int apply_runtime_config_handlers(const cJSON* old_event, const cJSON* new_event);
|
int apply_runtime_config_handlers(const cJSON* old_event, const cJSON* new_event);
|
||||||
|
|
||||||
// Utility functions
|
// Utility functions
|
||||||
char** find_existing_nrdb_files(void);
|
char** find_existing_db_files(void);
|
||||||
char* extract_pubkey_from_filename(const char* filename);
|
char* extract_pubkey_from_filename(const char* filename);
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
@@ -3251,7 +3251,7 @@ int main(int argc, char* argv[]) {
|
|||||||
log_info("Existing relay detected");
|
log_info("Existing relay detected");
|
||||||
|
|
||||||
// Find existing database file
|
// Find existing database file
|
||||||
char** existing_files = find_existing_nrdb_files();
|
char** existing_files = find_existing_db_files();
|
||||||
if (!existing_files || !existing_files[0]) {
|
if (!existing_files || !existing_files[0]) {
|
||||||
log_error("No existing relay database found");
|
log_error("No existing relay database found");
|
||||||
nostr_cleanup();
|
nostr_cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user