1471. [bug] libbind: updated to BIND 8.4.0.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4 2001/06/06 01:56:32 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@@ -185,7 +185,7 @@ ctl_client(evContext lev, const struct sockaddr *cap, size_t cap_len,
|
||||
if (evConnect(lev, ctx->sock, (const struct sockaddr *)sap, sap_len,
|
||||
conn_done, ctx, &ctx->coID) < 0) {
|
||||
(*ctx->logger)(ctl_error, "%s: evConnect(fd %d): %s",
|
||||
me, (void *)ctx->sock, strerror(errno));
|
||||
me, ctx->sock, strerror(errno));
|
||||
fatal:
|
||||
if (ctx != NULL) {
|
||||
if (ctx->sock >= 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3 2001/04/03 06:42:30 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@@ -252,7 +252,7 @@ ctl_server(evContext lev, const struct sockaddr *sap, size_t sap_len,
|
||||
&ctx->acID) < 0) {
|
||||
save_errno = errno;
|
||||
(*ctx->logger)(ctl_error, "%s: evListen(fd %d): %s",
|
||||
me, (void *)ctx->sock, strerror(errno));
|
||||
me, ctx->sock, strerror(errno));
|
||||
close(ctx->sock);
|
||||
memput(ctx, sizeof *ctx);
|
||||
errno = save_errno;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: ev_files.c,v 1.3 2001/07/02 02:02:27 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ev_files.c,v 1.3.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -54,7 +54,7 @@ evSelectFD(evContext opaqueCtx,
|
||||
int mode;
|
||||
|
||||
evPrintf(ctx, 1,
|
||||
"evSelectFD(ctx %#x, fd %d, mask 0x%x, func %#x, uap %#x)\n",
|
||||
"evSelectFD(ctx %p, fd %d, mask 0x%x, func %p, uap %p)\n",
|
||||
ctx, fd, eventmask, func, uap);
|
||||
if (eventmask == 0 || (eventmask & ~EV_MASK_ALL) != 0)
|
||||
EV_ERR(EINVAL);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: ev_timers.c,v 1.2 2001/06/27 03:55:46 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif
|
||||
|
||||
/* Import. */
|
||||
@@ -152,10 +152,10 @@ evSetTimer(evContext opaqueCtx,
|
||||
evTimer *id;
|
||||
|
||||
evPrintf(ctx, 1,
|
||||
"evSetTimer(ctx %#x, func %#x, uap %#x, due %d.%09ld, inter %d.%09ld)\n",
|
||||
"evSetTimer(ctx %p, func %p, uap %p, due %ld.%09ld, inter %ld.%09ld)\n",
|
||||
ctx, func, uap,
|
||||
due.tv_sec, due.tv_nsec,
|
||||
inter.tv_sec, inter.tv_nsec);
|
||||
(long)due.tv_sec, due.tv_nsec,
|
||||
(long)inter.tv_sec, inter.tv_nsec);
|
||||
|
||||
/* due={0,0} is a magic cookie meaning "now." */
|
||||
if (due.tv_sec == 0 && due.tv_nsec == 0L)
|
||||
@@ -379,10 +379,10 @@ print_timer(void *what, void *uap) {
|
||||
|
||||
cur = what;
|
||||
evPrintf(ctx, 7,
|
||||
" func %p, uap %p, due %d.%09ld, inter %d.%09ld\n",
|
||||
" func %p, uap %p, due %ld.%09ld, inter %ld.%09ld\n",
|
||||
cur->func, cur->uap,
|
||||
cur->due.tv_sec, cur->due.tv_nsec,
|
||||
cur->inter.tv_sec, cur->inter.tv_nsec);
|
||||
(long)cur->due.tv_sec, cur->due.tv_nsec,
|
||||
(long)cur->inter.tv_sec, cur->inter.tv_nsec);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: ev_waits.c,v 1.1 2001/03/29 06:31:54 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ev_waits.c,v 1.1.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -190,14 +190,14 @@ print_waits(evContext_p *ctx) {
|
||||
evPrintf(ctx, 9, "wait waiting:\n");
|
||||
for (wl = ctx->waitLists; wl != NULL; wl = wl->next) {
|
||||
INSIST(wl->first != NULL);
|
||||
evPrintf(ctx, 9, " tag %#x:", wl->first->tag);
|
||||
evPrintf(ctx, 9, " tag %p:", wl->first->tag);
|
||||
for (this = wl->first; this != NULL; this = this->next)
|
||||
evPrintf(ctx, 9, " %#x", this);
|
||||
evPrintf(ctx, 9, " %p", this);
|
||||
evPrintf(ctx, 9, "\n");
|
||||
}
|
||||
evPrintf(ctx, 9, "wait done:");
|
||||
for (this = ctx->waitDone.first; this != NULL; this = this->next)
|
||||
evPrintf(ctx, 9, " %#x", this);
|
||||
evPrintf(ctx, 9, " %p", this);
|
||||
evPrintf(ctx, 9, "\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: eventlib.c,v 1.2 2001/06/27 03:55:47 marka Exp $";
|
||||
static const char rcsid[] = "$Id: eventlib.c,v 1.2.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -291,12 +291,12 @@ evGetNext(evContext opaqueCtx, evEvent *opaqueEv, int options) {
|
||||
}
|
||||
|
||||
evPrintf(ctx, 4,
|
||||
"pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
|
||||
"pselect(%d, 0x%lx, 0x%lx, 0x%lx, %ld.%09ld)\n",
|
||||
ctx->fdMax+1,
|
||||
(u_long)ctx->rdLast.fds_bits[0],
|
||||
(u_long)ctx->wrLast.fds_bits[0],
|
||||
(u_long)ctx->exLast.fds_bits[0],
|
||||
tp ? tp->tv_sec : -1,
|
||||
tp ? (long)tp->tv_sec : -1L,
|
||||
tp ? tp->tv_nsec : -1);
|
||||
|
||||
/* XXX should predict system's earliness and adjust. */
|
||||
@@ -463,7 +463,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
|
||||
evAccept *this = ev->u.accept.this;
|
||||
|
||||
evPrintf(ctx, 5,
|
||||
"Dispatch.Accept: fd %d -> %d, func %#x, uap %#x\n",
|
||||
"Dispatch.Accept: fd %d -> %d, func %p, uap %p\n",
|
||||
this->conn->fd, this->fd,
|
||||
this->conn->func, this->conn->uap);
|
||||
errno = this->ioErrno;
|
||||
@@ -480,7 +480,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
|
||||
int eventmask = ev->u.file.eventmask;
|
||||
|
||||
evPrintf(ctx, 5,
|
||||
"Dispatch.File: fd %d, mask 0x%x, func %#x, uap %#x\n",
|
||||
"Dispatch.File: fd %d, mask 0x%x, func %p, uap %p\n",
|
||||
this->fd, this->eventmask, this->func, this->uap);
|
||||
(this->func)(opaqueCtx, this->uap, this->fd, eventmask);
|
||||
#ifdef EVENTLIB_TIME_CHECKS
|
||||
@@ -492,7 +492,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
|
||||
evStream *this = ev->u.stream.this;
|
||||
|
||||
evPrintf(ctx, 5,
|
||||
"Dispatch.Stream: fd %d, func %#x, uap %#x\n",
|
||||
"Dispatch.Stream: fd %d, func %p, uap %p\n",
|
||||
this->fd, this->func, this->uap);
|
||||
errno = this->ioErrno;
|
||||
(this->func)(opaqueCtx, this->uap, this->fd, this->ioDone);
|
||||
@@ -504,7 +504,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
|
||||
case Timer: {
|
||||
evTimer *this = ev->u.timer.this;
|
||||
|
||||
evPrintf(ctx, 5, "Dispatch.Timer: func %#x, uap %#x\n",
|
||||
evPrintf(ctx, 5, "Dispatch.Timer: func %p, uap %p\n",
|
||||
this->func, this->uap);
|
||||
(this->func)(opaqueCtx, this->uap, this->due, this->inter);
|
||||
#ifdef EVENTLIB_TIME_CHECKS
|
||||
@@ -516,7 +516,7 @@ evDispatch(evContext opaqueCtx, evEvent opaqueEv) {
|
||||
evWait *this = ev->u.wait.this;
|
||||
|
||||
evPrintf(ctx, 5,
|
||||
"Dispatch.Wait: tag %#x, func %#x, uap %#x\n",
|
||||
"Dispatch.Wait: tag %p, func %p, uap %p\n",
|
||||
this->tag, this->func, this->uap);
|
||||
(this->func)(opaqueCtx, this->uap, this->tag);
|
||||
#ifdef EVENTLIB_TIME_CHECKS
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/* eventlib_p.h - private interfaces for eventlib
|
||||
* vix 09sep95 [initial]
|
||||
*
|
||||
* $Id: eventlib_p.h,v 1.3 2001/07/03 06:49:54 marka Exp $
|
||||
* $Id: eventlib_p.h,v 1.3.2.1 2003/06/27 03:51:41 marka Exp $
|
||||
*/
|
||||
|
||||
#ifndef _EVENTLIB_P_H
|
||||
@@ -198,7 +198,8 @@ typedef struct {
|
||||
|
||||
/* eventlib.c */
|
||||
#define evPrintf __evPrintf
|
||||
void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...);
|
||||
void evPrintf(const evContext_p *ctx, int level, const char *fmt, ...)
|
||||
ISC_FORMAT_PRINTF(3, 4);
|
||||
|
||||
/* ev_timers.c */
|
||||
#define evCreateTimers __evCreateTimers
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: logging.c,v 1.3 2001/06/21 08:26:15 marka Exp $";
|
||||
static const char rcsid[] = "$Id: logging.c,v 1.3.2.1 2003/06/27 03:51:41 marka Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -282,6 +282,10 @@ log_vwrite(log_context lc, int category, int level, const char *format,
|
||||
log_channel chan;
|
||||
struct timeval tv;
|
||||
struct tm *local_tm;
|
||||
#ifdef HAVE_TIME_R
|
||||
struct tm tm_tmp;
|
||||
#endif
|
||||
time_t tt;
|
||||
const char *category_name;
|
||||
const char *level_str;
|
||||
char time_buf[256];
|
||||
@@ -313,10 +317,11 @@ log_vwrite(log_context lc, int category, int level, const char *format,
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
syslog(LOG_INFO, "gettimeofday failed in log_vwrite()");
|
||||
} else {
|
||||
tt = tv.tv_sec;
|
||||
#ifdef HAVE_TIME_R
|
||||
localtime_r((time_t *)&tv.tv_sec, &local_tm);
|
||||
local_tm = localtime_r(&tt, &tm_tmp);
|
||||
#else
|
||||
local_tm = localtime((time_t *)&tv.tv_sec);
|
||||
local_tm = localtime(&tt);
|
||||
#endif
|
||||
if (local_tm != NULL) {
|
||||
sprintf(time_buf, "%02d-%s-%4d %02d:%02d:%02d.%03ld ",
|
||||
|
||||
Reference in New Issue
Block a user