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 is used to deal with a handful of very special
places where something is qualified as const but really needs to have
its const qualifier removed.
rdata.c now defines macros for the prototypes of the basic rdata functions,
and all of the lib/dns/rdata/**/*.c files now use them.
Some minor integer-compatibility issues. (IE, ~0x03 is a signed int,
so assigning it to an unsigned int should use a cast. The type of an
enum member is int, so there are some conversion issues there, too.)
A pointers-to-function should not be cast to a pointer-to-object.
Variables should not be named for C reserved identifiers.
One or two set-but-not-used variables removed.
Minor other ISC style cleanups.
reversing part of the changes made on 2000/05/17. Doing an explicit
zone shutdown on destruction of the zone table caused the zone to
be shut down prematurely on server reload when the zone table was
destroyed but the zone had already been attached to a new zone table.
An external reference count is needed to correctly handle this situation.
zone->expire instead of zone->expiretime. This left zone->expiretime
with a value of zero, causing zone_settimer() to get horribly confused
and set the timer to the inactive state (!). This in turn caused
notify-driven refreshes (and probably other timer-scheduled events, too)
to never happen.
involved extensive restructuring of the reference counting of
zones and related objects.
Zones now attach to their views. To avoid a circular dependency that
would keep views from ever shutting down, this is done using the new
functions dns_view_weakattach() / dns_view_weakdetach() which
guarantee that the view will not be freed but still allow it
to be shut down.
The zones themselves now only have a single reference count, with
similar "weak" semantics. Managed zones must now be shut down
explicitly by calling dns_zone_shutdown(). To shut down all
zones in a zone table, call dns_zt_shutdown().
The zone manager is now reference counted, weakly. To shut down the
zone manager, you must explicitly call dns_zonemgr_shutdown().
170. [cleanup] Remove inter server consistancy checks from zone,
these should return as a seperate module in 9.1.
dns_zone_checkservers(), dns_zone_checkparents(),
dns_zone_checkchildren(), dns_zone_checkglue().
Remove dns_zone_setadb(), dns_zone_setresolver(),
dns_zone_setrequestmgr() these should now be found
via the view.
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.
*/
dns_zone_clearnotify() and dns_zone_addnotify()
are replaced by dns_zone_setnotifyalso().
dns_zone_clearmasters() and dns_zone_addmaster()
are replaced by dns_zone_setmasters().
Added:
isc_buffer_base(b) (pointer)
isc_buffer_current(b) (pointer)
isc_buffer_active(b) (pointer)
isc_buffer_used(b) (pointer)
isc_buffer_length(b) (int)
isc_buffer_usedlength(b) (int)
isc_buffer_consumedlength(b) (int)
isc_buffer_remaininglength(b) (int)
isc_buffer_activelength(b) (int)
isc_buffer_availablelength(b) (int)
Removed:
ISC_BUFFER_USEDCOUNT(b)
ISC_BUFFER_AVAILABLECOUNT(b)
isc_buffer_type(b)
Changed names:
isc_buffer_used(b, r) ->
isc_buffer_usedregion(b, r)
isc_buffer_available(b, r) ->
isc_buffer_available_region(b, r)
isc_buffer_consumed(b, r) ->
isc_buffer_consumedregion(b, r)
isc_buffer_active(b, r) ->
isc_buffer_activeregion(b, r)
isc_buffer_remaining(b, r) ->
isc_buffer_remainingregion(b, r)
Buffer types were removed, so the ISC_BUFFERTYPE_*
macros are no more, and the type argument to
isc_buffer_init and isc_buffer_allocate were removed.
isc_buffer_putstr is now void (instead of isc_result_t)
and requires that the caller ensure that there
is enough available buffer space for the string.
Log at ISC_LOG_DEBUG(1) when dns_zone_load is entered, when it skips
loading because the file is older than the last load time, and when it
has successfully loaded the zone.