Compare commits

...

1 Commits

Author SHA1 Message Date
Your Name
2e8eda5c67 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)
2025-09-07 06:58:50 -04:00
5 changed files with 5 additions and 5 deletions

View File

@@ -1 +1 @@
1187428
1190476

View File

@@ -33,7 +33,7 @@ static cJSON* g_pending_config_event = NULL;
// UTILITY FUNCTIONS
// ================================
char** find_existing_nrdb_files(void) {
char** find_existing_db_files(void) {
DIR *dir;
struct dirent *entry;
char **files = NULL;
@@ -342,7 +342,7 @@ int get_config_bool(const char* key, int default_value) {
// ================================
int is_first_time_startup(void) {
char** existing_files = find_existing_nrdb_files();
char** existing_files = find_existing_db_files();
if (existing_files) {
// Free the array
for (int i = 0; existing_files[i]; i++) {

View File

@@ -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);
// Utility functions
char** find_existing_nrdb_files(void);
char** find_existing_db_files(void);
char* extract_pubkey_from_filename(const char* filename);
#endif /* CONFIG_H */

View File

@@ -3251,7 +3251,7 @@ int main(int argc, char* argv[]) {
log_info("Existing relay detected");
// Find existing database file
char** existing_files = find_existing_nrdb_files();
char** existing_files = find_existing_db_files();
if (!existing_files || !existing_files[0]) {
log_error("No existing relay database found");
nostr_cleanup();