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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user