From c9e87b2cf3529c34ba3c88bc1046be77528fc111 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 28 Jun 2021 12:35:03 +0200 Subject: [PATCH] config_file: print message when config file couldn't be read this prints an message on stdout so config files are not simply skipped and the default one is read instead. --- lib/include/srsran/common/config_file.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/include/srsran/common/config_file.h b/lib/include/srsran/common/config_file.h index 264f670d1..56c6d4530 100644 --- a/lib/include/srsran/common/config_file.h +++ b/lib/include/srsran/common/config_file.h @@ -35,6 +35,7 @@ bool config_exists(std::string& filename, std::string default_name) homedir = "."; } snprintf(full_path, sizeof(full_path), "%s/.config/srsran/%s", homedir, default_name.c_str()); + printf("Couldn't open %s, trying %s\n", filename.c_str(), full_path); filename = std::string(full_path); // try to open again @@ -43,6 +44,7 @@ bool config_exists(std::string& filename, std::string default_name) // Last chance, try to find file in /etc/srsran ZERO_OBJECT(full_path); snprintf(full_path, sizeof(full_path), "/etc/srsran/%s", default_name.c_str()); + printf("Couldn't open %s either, trying %s\n", filename.c_str(), full_path); filename = std::string(full_path); // try to open again