| 67 | static const FB_UINT64 TOUCH_INTERVAL = 60 * 60; // in seconds, one hour should be enough |
| 68 | |
| 69 | void checkFileError(const char* filename, const char* operation, ISC_STATUS iscError) |
| 70 | { |
| 71 | if (errno == 0) |
| 72 | return; |
| 73 | |
| 74 | #ifdef WIN_NT |
| 75 | // we can't use SYS_ERR(errno) on Windows as errno codes is not |
| 76 | // the same as GetLastError() codes |
| 77 | const char* strErr = strerror(errno); |
| 78 | |
| 79 | (Arg::Gds(isc_io_error) << Arg::Str(operation) << Arg::Str(filename) << |
| 80 | Arg::Gds(iscError) << Arg::Str(strErr)).raise(); |
| 81 | #else |
| 82 | (Arg::Gds(isc_io_error) << Arg::Str(operation) << Arg::Str(filename) << |
| 83 | Arg::Gds(iscError) << SYS_ERR(errno)).raise(); |
| 84 | #endif |
| 85 | } |
| 86 | |
| 87 | ConfigStorage::ConfigStorage() |
| 88 | : m_timer(FB_NEW TouchFile), |
no test coverage detected