check for unopenable file

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3594 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-10-13 17:54:24 +00:00
parent aa18bc3421
commit 95de2683f0

View File

@@ -214,6 +214,8 @@ log_file(const char *time,
struct file_data *f = data;
if(f->keep_open == 0)
f->fd = fopen(f->filename, f->mode);
if(f->fd == NULL)
return;
fprintf(f->fd, "%s %s\n", time, msg);
if(f->keep_open == 0)
fclose(f->fd);