mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 16:15:27 +00:00
1602. [bug] Logging to a file failed unless a size was specified.
[RT# 10925]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -12,7 +12,8 @@
|
|||||||
1603. [bug] nsupdate: set interactive based on isatty().
|
1603. [bug] nsupdate: set interactive based on isatty().
|
||||||
[RT# 10929]
|
[RT# 10929]
|
||||||
|
|
||||||
1602. [placeholder] rt10925.
|
1602. [bug] Logging to a file failed unless a size was specified.
|
||||||
|
[RT# 10925]
|
||||||
|
|
||||||
1601. [placeholder] rt10920.
|
1601. [placeholder] rt10920.
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: log.h,v 1.47 2004/03/05 05:10:58 marka Exp $ */
|
/* $Id: log.h,v 1.48 2004/04/10 04:33:36 marka Exp $ */
|
||||||
|
|
||||||
#ifndef ISC_LOG_H
|
#ifndef ISC_LOG_H
|
||||||
#define ISC_LOG_H 1
|
#define ISC_LOG_H 1
|
||||||
@@ -96,6 +96,8 @@ struct isc_logmodule {
|
|||||||
* channel the name, versions and maximum_size should be set before calling
|
* channel the name, versions and maximum_size should be set before calling
|
||||||
* isc_log_createchannel(). To define an ISC_LOG_TOFILEDESC channel set only
|
* isc_log_createchannel(). To define an ISC_LOG_TOFILEDESC channel set only
|
||||||
* the stream before the call.
|
* the stream before the call.
|
||||||
|
*
|
||||||
|
* Setting maximum_size to zero implies no maximum.
|
||||||
*/
|
*/
|
||||||
typedef struct isc_logfile {
|
typedef struct isc_logfile {
|
||||||
FILE *stream; /* Initialized to NULL for ISC_LOG_TOFILE. */
|
FILE *stream; /* Initialized to NULL for ISC_LOG_TOFILE. */
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: log.c,v 1.84 2004/03/16 05:52:20 marka Exp $ */
|
/* $Id: log.c,v 1.85 2004/04/10 04:33:36 marka Exp $ */
|
||||||
|
|
||||||
/* Principal Authors: DCL */
|
/* Principal Authors: DCL */
|
||||||
|
|
||||||
@@ -1317,7 +1317,7 @@ isc_log_open(isc_logchannel_t *channel) {
|
|||||||
if (stat(path, &statbuf) == 0) {
|
if (stat(path, &statbuf) == 0) {
|
||||||
regular_file = S_ISREG(statbuf.st_mode) ? ISC_TRUE : ISC_FALSE;
|
regular_file = S_ISREG(statbuf.st_mode) ? ISC_TRUE : ISC_FALSE;
|
||||||
/* XXXDCL if not regular_file complain? */
|
/* XXXDCL if not regular_file complain? */
|
||||||
roll = ISC_TF(regular_file &&
|
roll = ISC_TF(regular_file && FILE_MAXSIZE(channel) > 0 &&
|
||||||
statbuf.st_size >= FILE_MAXSIZE(channel));
|
statbuf.st_size >= FILE_MAXSIZE(channel));
|
||||||
} else if (errno == ENOENT)
|
} else if (errno == ENOENT)
|
||||||
regular_file = ISC_TRUE;
|
regular_file = ISC_TRUE;
|
||||||
@@ -1691,7 +1691,7 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
|
|||||||
* threshold, note it so that it will not be logged
|
* threshold, note it so that it will not be logged
|
||||||
* to any more.
|
* to any more.
|
||||||
*/
|
*/
|
||||||
if (FILE_MAXSIZE(channel) != 0) {
|
if (FILE_MAXSIZE(channel) > 0) {
|
||||||
INSIST(channel->type == ISC_LOG_TOFILE);
|
INSIST(channel->type == ISC_LOG_TOFILE);
|
||||||
|
|
||||||
/* XXXDCL NT fstat/fileno */
|
/* XXXDCL NT fstat/fileno */
|
||||||
|
Reference in New Issue
Block a user