2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-27 04:28:33 +00:00

169 Commits

Author SHA1 Message Date
Danny Mayer
c4958494a9 Updates to support LIBISC_EXTERNAL_DATA and misc. cleanup 2001-07-12 05:58:28 +00:00
Danny Mayer
53bc020d74 modified to use isc_file_rename instead of rename 2001-06-27 04:37:11 +00:00
David Lawrence
eda73d8aad redo 1.64 "potential null pointer dereference" more consistent with the style
of the function and file (i.e., not returning from the middle of a function)
2001-06-10 17:06:45 +00:00
Mark Andrews
4585aeb2cc 866. [func] Close debug only file channels when debug is set to
zero. [RT #1246]
2001-06-08 02:57:13 +00:00
David Lawrence
92ef1a9b9d use ISC_MAGIC for all magic numbers, for our friends in EBCDIC land 2001-06-04 19:33:39 +00:00
Brian Wellington
9547c4a3f8 potential null pointer dereference 2001-05-29 22:35:54 +00:00
Mark Andrews
097dc0a693 add sys/types.h for FreeBSD 2.1 2001-05-18 03:02:45 +00:00
Andreas Gustafsson
1ed0723a1f a pointer argument used to return an "int" value into an "int"
variable is better defined as "int *" than "unsigned int *"
2001-04-28 01:08:07 +00:00
David Lawrence
2b5f436aeb Make greatest_version() return an isc_result_t, which it should have
been doing all along since there was the possibility isc_dir_open() would
fail and overloading the return value of "0" was bad practice.

If isc_dir_open() fails in greatest_version(), make sure the path separator
is restored to the destination pathname if it was NULified before returning
the error.

The underlying problem of isc_log_open() not having the bad result of
isc_dir_open() reported anywhere will be slightly mediate by a change
to bin/named/logconf.c to test the directory.  lib/isc/log.c can't really
handle it because it has no idea to where such an error should be reported,
and it only shows up during isc_log_open() as part of the isc_log_write()
family of calls, which are all void.
2001-04-25 23:59:44 +00:00
David Lawrence
6f053cd485 use ISC_TF() to set an isc_boolean_t 2001-04-12 21:04:14 +00:00
David Lawrence
2a86ee1f54 simplify the test about whether to roll; one expression was redundant 2001-03-28 05:48:16 +00:00
David Lawrence
9027e1bcf1 796. [func] When a size limit is associated with a log file,
only roll it when the size is reached, not every
			time the log file is opened. [RT #1096]
2001-03-28 04:16:32 +00:00
Mark Andrews
df0f58959e 752. [func] Correct bad tv_usec elements returned by gettimeofday(). 2001-02-23 23:12:28 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
David Lawrence
f8da2d9583 634. [bug] A log file will completely stop being written when
it reaches the maximum size in all cases, not just
			when versioning is also enabled. [RT #570]
2000-12-23 19:23:48 +00:00
David Lawrence
b74896ead5 599. [func] Added four new functions to the libisc log API to
support i18n messages.  isc_log_iwrite(),
			isc_log_ivwrite(), isc_log_iwrite1() and
			isc_log_ivwrite1() were added.

(The log.h/log.c changes were just minor formatting changes.)
2000-12-12 05:29:33 +00:00
Andreas Gustafsson
fc6f5743aa use isc_log_iwrite() for localized logging,
to keep backwards compatibility
2000-12-12 00:18:01 +00:00
Mark Andrews
6fda157766 ISC_LINK_*UNSAFE -> ISC_LINK_INITAND* 2000-12-07 20:15:58 +00:00
David Lawrence
b161f87be8 Updated API to support i18n message arguments to isc_log_{,v}write{,1}.
Provided isc_log_i{,v}write{,1}, with appropriate macro substitutions,
for files that are not yet converted to the new API.  When everything
is converted, the added functions will be removed.
2000-12-07 19:30:28 +00:00
David Lawrence
9cd6d409b7 first pass at using isc_msgcat_get for message strings in libisc 2000-12-06 00:30:32 +00:00
Mark Andrews
8a0ff6c15c 576. [doc] isc_log_create() description did not match reality.
575.   [bug]           isc_log_create() was not setting internal state
                        correctly to reflect the default channels created.
2000-11-24 01:37:26 +00:00
Mark Andrews
5e589b5356 Uninitalised link fixes, batch 1. 2000-10-20 02:21:58 +00:00
Brian Wellington
df03463a37 Allow *_log_setcontext() to be called multiple times, so that *_lctx
can be set to NULL once the log context has been freed.
2000-09-26 22:10:44 +00:00
Brian Wellington
4b809ba346 415. [bug] The logging code leaked file descriptors. 2000-08-31 20:58:15 +00:00
Brian Wellington
6714319d0f Add a DESTROYLOCK macro to wrap isc_mutex_destroy() 2000-08-26 01:23:17 +00:00
Brian Wellington
d07ef64ed1 #include <time.h> 2000-08-24 23:22:40 +00:00
Andreas Gustafsson
dcfbc7c73e do not clear lctx->buffer before it is has been locked 2000-08-24 18:21:40 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Andreas Gustafsson
4532e9e7c6 in isc_log_wouldlog(), deal with the possibility of lctx
being NULL
2000-07-13 02:28:18 +00:00
Andreas Gustafsson
30576c592b 330. [func] New function isc_log_wouldlog(). 2000-07-13 00:19:02 +00:00
David Lawrence
c244584cad 276. [bug] isc_log_categorybyname() and isc_log_modulebyname()
would fail to find the first member of any category
                        or module array apart from the internal defaults.
                        Thus, for example, the "notify" category was improperly
                        configured by named.

This resolves RT #132, "Logging channels definition problems."
2000-06-23 17:52:20 +00:00
Brian Wellington
ac37a32d23 If isc_log_settag() was used to set a non-NULL tag, the allocated memory
was never freed.
2000-06-02 18:15:45 +00:00
David Lawrence
87cafc5e70 Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

The macro DE_CONST was added to isc/util.h to deal with a handful of very
special places where something is qualified as const but really needs to have
its const qualifier removed.

Also cleaned up a few places where variable names clashed with reserved
identifiers.  (Which mostly works fine, but strictly speaking is undefined
by the standard.)

Minor other ISC style cleanups.
2000-06-01 17:20:56 +00:00
David Lawrence
389b5c8593 added a sync_channellist call to isc_log_create to ensure the channellist in
the logconfig is properly dimensioned, and only free the channellist
memory in isc_logconfig_destroy if the channellist_count is > 0.
the first addresses a problem that could occur when a successful
isc_log_create was followed immediately by isc_log_[v]write[1] or
isc_log_destroy (with no intervening isc_log_usechannel or
isc_logconfig_use), and the second addresses a problem that could
occur in cleanup if isc_log_create or isc_logconfig_create failed.
2000-05-24 02:33:16 +00:00
David Lawrence
76b4bfdf32 minor assertion check shuffling 2000-05-18 22:38:49 +00:00
Brian Wellington
a375150af2 REQUIRE() checking in isc_log_doit could seg fault 2000-05-18 17:56:35 +00:00
David Lawrence
75a44b91a9 isc_time_subtract() now returns isc_result_t.
Use isc_time_secondsastimet() to set a time_t variable.

Properly skip the duplicate checking loop if the boundary time is not
successfully set (this was intended before, but coded wrongly).

Removed unused variable pid_string, after I opted to not add the
unrequested ISC_LOG_PRINTPID option half way into implementing it.
2000-05-18 17:20:15 +00:00
David Lawrence
2918b5bda6 ISC_LOG_PRINTTAG/isc_log_settag()/isc_log_gettag() added 2000-05-16 03:37:39 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Michael Graff
1a487fb7d2 Add isc_log_setcontext() to set the isc_lctx global (ala dns_lctx) and add module names for isc/socket 2000-05-03 21:09:34 +00:00
Michael Graff
2d3a9eee3f namespace protection via 'static' 2000-04-28 17:29:25 +00:00
David Lawrence
6b7257f756 include config.h 2000-04-28 02:08:20 +00:00
David Lawrence
a9cb032d07 comparison of channel->type to NULL should have been to ISC_LOG_TONULL 2000-04-11 18:22:34 +00:00
David Lawrence
e6a6c0a5d6 35. [performance] Log messages which are of a level too high to be
logged by any channel in the logging configuration
                        will not cause the log mutex to be locked.
2000-04-06 20:32:31 +00:00
Andreas Gustafsson
5fe5a0c026 revised logging categories 2000-03-23 00:55:12 +00:00
Andreas Gustafsson
d132769ee8 the syslog facility for the default_syslog channel is
LOG_DAEMON, not LOG_INFO
2000-03-23 00:49:15 +00:00
Bob Halley
4dcfb5fb22 lint 2000-03-14 19:27:55 +00:00
David Lawrence
912ccd2554 include milliseconds when doing ISC_LOG_PRINTTIME 2000-03-10 17:53:16 +00:00
David Lawrence
1be10d46cb require name != NULL in *byname 2000-03-04 16:41:14 +00:00