gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5191 - GNUnet/src/util/loggers


From: gnunet
Subject: [GNUnet-SVN] r5191 - GNUnet/src/util/loggers
Date: Sat, 30 Jun 2007 21:13:10 -0600 (MDT)

Author: grothoff
Date: 2007-06-30 21:13:10 -0600 (Sat, 30 Jun 2007)
New Revision: 5191

Modified:
   GNUnet/src/util/loggers/file.c
Log:
check for fopen

Modified: GNUnet/src/util/loggers/file.c
===================================================================
--- GNUnet/src/util/loggers/file.c      2007-07-01 00:33:26 UTC (rev 5190)
+++ GNUnet/src/util/loggers/file.c      2007-07-01 03:13:10 UTC (rev 5191)
@@ -225,6 +225,13 @@
       fctx->first_start = NO;
       fclose(fctx->handle);
       fctx->handle = FOPEN(name, "a+");
+      if (fctx->handle == NULL) {
+       fctx->handle = stderr;
+       fprintf(stderr,
+               _("Failed to open log-file `%s': %s\n"),
+               name,
+               STRERROR(errno));
+      }
       FREE(fctx->filename);
       fctx->filename = name;
       dirname = STRDUP(name);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]