diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/datafiles.c | 12 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 18 insertions, 1 deletions
@@ -8,6 +8,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005 07/01 A Events for channel access/xop updates. [ #00] 06/26 A New module pack module: hs_request. [ #00] 06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389] +09/09 F Giving some more error output when opening a database fails. [ #00] 09/04 F Protocol module for plexus called wrong UNSGLINE function. [ #00] 08/31 F Help for /os modlist had faulty 'limited to' information. [ #00] 08/30 F Changed UserKeys to RECOMMENDED instead of REQUIRED. [ #00] diff --git a/src/datafiles.c b/src/datafiles.c index 5ccbe95ee..117f2c32e 100644 --- a/src/datafiles.c +++ b/src/datafiles.c @@ -17,6 +17,7 @@ #include <fcntl.h> static int curday = 0; +static time_t lastwarn = 0; /*************************************************************************/ @@ -91,6 +92,12 @@ static dbFILE *open_db_read(const char *service, const char *filename) if (!f) { #ifndef NOT_MAIN log_perror("Can't read %s database %s", service, filename); + if (time(NULL) - lastwarn > WarningTimeout) { + anope_cmd_global(NULL, + "Write error on %s: Memory allocation failed", + filename); + lastwarn = time(NULL); + } #endif return NULL; } @@ -103,6 +110,11 @@ static dbFILE *open_db_read(const char *service, const char *filename) if (errno != ENOENT) log_perror("Can not read %s database %s", service, f->filename); + if (time(NULL) - lastwarn > WarningTimeout) { + anope_cmd_global(NULL, "Write error on %s: %s", f->filename, + strerror(errno)); + lastwarn = time(NULL); + } #endif free(f); errno = errno_save; diff --git a/version.log b/version.log index 2db132d39..a232853e1 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="10" -VERSION_BUILD="876" +VERSION_BUILD="877" # $Log$ # +# BUILD : 1.7.10 (877) +# BUGS : +# NOTES : Added two more globops warnings when a database cannott be opened +# # BUILD : 1.7.10 (876) # BUGS : # NOTES : Added something about DevNull to the FAQ |