aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-04 11:35:14 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-04 12:08:33 +0100
commit2c5c079e5339c64b6bc0b65c2af7b1d60a2f9be9 (patch)
tree0d5ab70826c8973c290c01840783b4d58cb705e7
parentcbf23b646552e36ed0b085197477c2d9c7b575ac (diff)
print error message when config file cannot be opened
-rw-r--r--src/e1_recorder.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/e1_recorder.c b/src/e1_recorder.c
index d085ca5..07fd4a6 100644
--- a/src/e1_recorder.c
+++ b/src/e1_recorder.c
@@ -1,5 +1,6 @@
#include <signal.h>
#include <getopt.h>
+#include <errno.h>
#include <osmocom/core/signal.h>
#include <osmocom/core/logging.h>
@@ -150,8 +151,11 @@ int main(int argc, char **argv)
handle_options(argc, argv);
rc = vty_read_config_file(g_config_file, NULL);
- if (rc < 0)
+ if (rc < 0) {
+ fprintf(stderr, "Cannot parse configuration file '%s': %s\n", g_config_file,
+ strerror(errno));
exit(1);
+ }
/* start telne tafte reading config for vty_get_bind_adr() */
telnet_init_dynif(rec_tall_ctx, NULL, vty_get_bind_addr(), 4444);