Skip to content

Commit

Permalink
Merge pull request #1458 from jpereira/fix/open1
Browse files Browse the repository at this point in the history
print out error message if we're unable to open the file
  • Loading branch information
arr2036 committed Dec 17, 2015
2 parents 4e44f38 + 73c7c13 commit 0810144
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit 0810144

Please sign in to comment.