From 73c7c132e49cfb5fa4ed454c00ed7098e8e1b5ec Mon Sep 17 00:00:00 2001 From: Jorge Pereira Date: Thu, 17 Dec 2015 15:58:17 -0200 Subject: [PATCH] print out error message if we're unable to open the file --- src/main/detail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/detail.c b/src/main/detail.c index 65f1324148f..0d31e388b76 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -271,7 +271,11 @@ static int detail_open(rad_listen_t *this) * And try to open the filename. */ data->work_fd = open(data->filename_work, O_RDWR); - if (data->work_fd < 0) return 0; + if (data->work_fd < 0) { + ERROR("Failed opening detail file %s: %s", + data->filename_work, fr_syserror(errno)); + return 0; + } #endif } /* else detail.work existed, and we opened it */ -- 2.47.3