/*
- * $Id: comm_select.cc,v 1.51 2001/10/19 22:34:49 hno Exp $
+ * $Id: comm_select.cc,v 1.52 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 5 Socket Functions
*
return COMM_ERROR;
/* NOTREACHED */
}
- debug(5, num ? 5 : 8) ("comm_poll: %d+%d FDs ready\n", num, npending);
+ debug(5, num ? 5 : 8) ("comm_poll: %d+%ld FDs ready\n", num, npending);
statHistCount(&statCounter.select_fds_hist, num);
/* Check timeout handlers ONCE each second. */
if (squid_curtime > last_timeout) {
return COMM_OK;
}
while (timeout > current_dtime);
- debug(5, 8) ("comm_poll: time out: %d.\n", squid_curtime);
+ debug(5, 8) ("comm_poll: time out: %ld.\n", (long int)squid_curtime);
return COMM_TIMEOUT;
}
/*
- * $Id: dns_internal.cc,v 1.42 2001/10/12 23:33:00 hno Exp $
+ * $Id: dns_internal.cc,v 1.43 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c
* AUTHOR: Duane Wessels
{
int i, n = 0;
variable_list *Answer = NULL;
- debug(49, 5) ("snmp_netDnsFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+ debug(49, 5) ("snmp_netDnsFn: Processing request: \n");
snmpDebugOid(5, Var->name, Var->name_length);
*ErrP = SNMP_ERR_NOERROR;
switch (Var->name[LEN_SQ_NET + 1]) {
/*
- * $Id: fqdncache.cc,v 1.148 2001/03/03 10:39:31 hno Exp $
+ * $Id: fqdncache.cc,v 1.149 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
snmp_netFqdnFn(variable_list * Var, snint * ErrP)
{
variable_list *Answer = NULL;
- debug(49, 5) ("snmp_netFqdnFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+ debug(49, 5) ("snmp_netFqdnFn: Processing request:\n");
snmpDebugOid(5, Var->name, Var->name_length);
*ErrP = SNMP_ERR_NOERROR;
switch (Var->name[LEN_SQ_NET + 1]) {
/*
- * $Id: ftp.cc,v 1.313 2001/10/17 20:25:02 hno Exp $
+ * $Id: ftp.cc,v 1.314 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
ftpState,
0);
} else {
- debug(9, 3) ("ftpReadStor: Unexpected reply code %s\n", code);
+ debug(9, 3) ("ftpReadStor: Unexpected reply code %03d\n", code);
ftpFail(ftpState);
}
}
/*
- * $Id: helper.cc,v 1.31 2001/10/17 20:25:02 hno Exp $
+ * $Id: helper.cc,v 1.32 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 29 Helper process maintenance
* AUTHOR: Harvest Derived?
}
cbdataLock(r->data);
if ((buf != NULL) && lastserver) {
- debug(29, 5) ("StatefulSubmit with lastserver %d\n", lastserver);
+ debug(29, 5) ("StatefulSubmit with lastserver %p\n", lastserver);
/* the queue doesn't count for this assert because queued requests
* have already gone through here and been tested.
* It's legal to have deferred_requests == 0 and queue entries
storeAppendPrintf(sentry, "avg service time: %d msec\n",
hlp->stats.avg_svc_time);
storeAppendPrintf(sentry, "\n");
- storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\n",
+ storeAppendPrintf(sentry, "%7s\t%7s\t%7s\t%11s\t%s\t%7s\t%7s\t%7s\t%7s\n",
"#",
"FD",
"PID",
/*
- * $Id: ipcache.cc,v 1.234 2001/03/03 10:39:32 hno Exp $
+ * $Id: ipcache.cc,v 1.235 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
snmp_netIpFn(variable_list * Var, snint * ErrP)
{
variable_list *Answer = NULL;
- debug(49, 5) ("snmp_netIpFn: Processing request:\n", Var->name[LEN_SQ_NET + 1]);
+ debug(49, 5) ("snmp_netIpFn: Processing request:\n");
snmpDebugOid(5, Var->name, Var->name_length);
*ErrP = SNMP_ERR_NOERROR;
switch (Var->name[LEN_SQ_NET + 1]) {
/*
- * $Id: main.cc,v 1.343 2001/10/23 12:14:49 hno Exp $
+ * $Id: main.cc,v 1.344 2001/10/24 06:16:16 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
debug(1, 1) ("Preparing for shutdown after %d requests\n",
statCounter.client_http.requests);
debug(1, 1) ("Waiting %d seconds for active connections to finish\n",
- wait);
+ (int)wait);
do_shutdown = 0;
shutting_down = 1;
serverConnectionsClose();
/*
- * $Id: peer_digest.cc,v 1.81 2001/04/14 00:25:18 hno Exp $
+ * $Id: peer_digest.cc,v 1.82 2001/10/24 06:16:17 hno Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
eventAdd("peerDigestCheck", peerDigestCheck, pd, (double) delay, 1);
pd->times.next_check = squid_curtime + delay;
debug(72, 3) ("peerDigestSetCheck: will check peer %s in %d secs\n",
- strBuf(pd->host), delay);
+ strBuf(pd->host), (int)delay);
}
/*
return;
}
debug(72, 3) ("peerDigestCheck: peer %s:%d\n", pd->peer->host, pd->peer->http_port);
- debug(72, 3) ("peerDigestCheck: time: %d, last received: %d (%+d)\n",
- squid_curtime, pd->times.received, (squid_curtime - pd->times.received));
+ debug(72, 3) ("peerDigestCheck: time: %ld, last received: %ld (%+d)\n",
+ (long int)squid_curtime, (long int)pd->times.received, (int)(squid_curtime - pd->times.received));
/* decide when we should send the request:
* request now unless too close to other requests */
/* per-peer limit */
if (req_time - pd->times.received < PeerDigestReqMinGap) {
debug(72, 2) ("peerDigestCheck: %s, avoiding close peer requests (%d < %d secs).\n",
- strBuf(pd->host), req_time - pd->times.received,
- PeerDigestReqMinGap);
+ strBuf(pd->host), (int)(req_time - pd->times.received),
+ (int)PeerDigestReqMinGap);
req_time = pd->times.received + PeerDigestReqMinGap;
}
/* global limit */
if (req_time - pd_last_req_time < GlobDigestReqMinGap) {
debug(72, 2) ("peerDigestCheck: %s, avoiding close requests (%d < %d secs).\n",
- strBuf(pd->host), req_time - pd_last_req_time,
- GlobDigestReqMinGap);
+ strBuf(pd->host), (int)(req_time - pd_last_req_time),
+ (int)GlobDigestReqMinGap);
req_time = pd_last_req_time + GlobDigestReqMinGap;
}
if (req_time <= squid_curtime)
assert(reply);
httpReplyParse(reply, buf, hdr_size);
status = reply->sline.status;
- debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %d (%+d)\n",
+ debug(72, 3) ("peerDigestFetchReply: %s status: %d, expires: %ld (%+d)\n",
strBuf(pd->host), status,
- reply->expires, reply->expires - squid_curtime);
+ (long int)reply->expires, (int)(reply->expires - squid_curtime));
/* this "if" is based on clientHandleIMSReply() */
if (status == HTTP_NOT_MODIFIED) {
fetch->resp_time = squid_curtime - fetch->start_time;
debug(72, 3) ("peerDigestFetchFinish: recv %d bytes in %d secs\n",
- fetch->recv.bytes, fetch->resp_time);
- debug(72, 3) ("peerDigestFetchFinish: expires: %d (%+d), lmt: %d (%+d)\n",
- fetch->expires, fetch->expires - squid_curtime,
- fetch->entry->lastmod, fetch->entry->lastmod - squid_curtime);
+ fetch->recv.bytes, (int)fetch->resp_time);
+ debug(72, 3) ("peerDigestFetchFinish: expires: %ld (%+d), lmt: %ld (%+d)\n",
+ (long int)fetch->expires, (int)(fetch->expires - squid_curtime),
+ (long int)fetch->entry->lastmod, (int)(fetch->entry->lastmod - squid_curtime));
}
peerDigestStatsReport(const PeerDigest * pd, StoreEntry * e)
{
#define f2s(flag) (pd->flags.flag ? "yes" : "no")
-#define appendTime(tm) storeAppendPrintf(e, "%s\t %10d\t %+d\t %+d\n", \
- ""#tm, pd->times.tm, \
+#define appendTime(tm) storeAppendPrintf(e, "%s\t %10ld\t %+d\t %+d\n", \
+ ""#tm, (long int)pd->times.tm, \
saneDiff(pd->times.tm - squid_curtime), \
saneDiff(pd->times.tm - pd->times.initialized))
storeAppendPrintf(e, "\tneeded: %3s, usable: %3s, requested: %3s\n",
f2s(needed), f2s(usable), f2s(requested));
storeAppendPrintf(e, "\n\tlast retry delay: %d secs\n",
- pd->times.retry_delay);
+ (int)pd->times.retry_delay);
storeAppendPrintf(e, "\tlast request response time: %d secs\n",
- pd->times.req_delay);
+ (int)pd->times.req_delay);
storeAppendPrintf(e, "\tlast request result: %s\n",
pd->req_result ? pd->req_result : "(none)");
/*
- * $Id: snmp_agent.cc,v 1.82 2001/10/17 20:25:03 hno Exp $
+ * $Id: snmp_agent.cc,v 1.83 2001/10/24 06:16:17 hno Exp $
*
* DEBUG: section 49 SNMP Interface
* AUTHOR: Kostas Anagnostakis
snmp_sysFn(variable_list * Var, snint * ErrP)
{
variable_list *Answer = NULL;
- debug(49, 5) ("snmp_sysFn: Processing request:\n", Var->name[LEN_SQ_SYS]);
+ debug(49, 5) ("snmp_sysFn: Processing request:\n");
snmpDebugOid(5, Var->name, Var->name_length);
*ErrP = SNMP_ERR_NOERROR;
switch (Var->name[LEN_SQ_SYS]) {
break;
f = snmpStatGet(0);
l = snmpStatGet(minutes);
- debug(49, 8) ("median: min= %d, %d l= %x , f = %x\n", minutes,
+ debug(49, 8) ("median: min= %d, %d l= %p , f = %p\n", minutes,
Var->name[LEN_SQ_PRF + 3], l, f);
- debug(49, 8) ("median: l= %x , f = %x\n", l, f);
+ debug(49, 8) ("median: l= %p , f = %p\n", l, f);
switch (Var->name[LEN_SQ_PRF + 3]) {
case PERF_MEDIAN_TIME:
x = minutes;
/*
- * $Id: stat.cc,v 1.348 2001/08/16 00:16:18 hno Exp $
+ * $Id: stat.cc,v 1.349 2001/10/24 06:16:17 hno Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
storeAppendPrintf(s, "\tFD %d, read %d, wrote %d\n", fd,
fd_table[fd].bytes_read, fd_table[fd].bytes_written);
storeAppendPrintf(s, "\tFD desc: %s\n", fd_table[fd].desc);
- storeAppendPrintf(s, "\tin: buf %p, offset %d, size %d\n",
- conn->in.buf, conn->in.offset, conn->in.size);
+ storeAppendPrintf(s, "\tin: buf %p, offset %ld, size %ld\n",
+ conn->in.buf, (long int)conn->in.offset, (long int)conn->in.size);
storeAppendPrintf(s, "\tpeer: %s:%d\n",
inet_ntoa(conn->peer.sin_addr),
ntohs(conn->peer.sin_port));
ntohs(conn->me.sin_port));
storeAppendPrintf(s, "\tnrequests: %d\n",
conn->nrequests);
- storeAppendPrintf(s, "\tdefer: n %d, until %d\n",
- conn->defer.n, conn->defer.until);
+ storeAppendPrintf(s, "\tdefer: n %d, until %ld\n",
+ conn->defer.n, (long int)conn->defer.until);
}
storeAppendPrintf(s, "uri %s\n", http->uri);
storeAppendPrintf(s, "log_type %s\n", log_tags[http->log_type]);
- storeAppendPrintf(s, "out.offset %d, out.size %d\n",
- http->out.offset, http->out.size);
+ storeAppendPrintf(s, "out.offset %ld, out.size %lu\n",
+ (long int)http->out.offset, (unsigned long int)http->out.size);
storeAppendPrintf(s, "req_sz %d\n", http->req_sz);
e = http->entry;
storeAppendPrintf(s, "entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A");
e = http->old_entry;
storeAppendPrintf(s, "old_entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A");
- storeAppendPrintf(s, "start %d.%06d (%f seconds ago)\n", http->start.tv_sec,
- http->start.tv_usec,
+ storeAppendPrintf(s, "start %ld.%06d (%f seconds ago)\n",
+ (long int)http->start.tv_sec,
+ (int)http->start.tv_usec,
tvSubDsec(http->start, current_time));
storeAppendPrintf(s, "\n");
}
/*
- * $Id: store.cc,v 1.542 2001/10/17 20:25:03 hno Exp $
+ * $Id: store.cc,v 1.543 2001/10/24 06:16:17 hno Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
(int) mem->inmem_hi);
debug(20, 1) ("MemObject->inmem_lo: %d\n",
(int) mem->inmem_lo);
- debug(20, 1) ("MemObject->clients: %p\n",
- mem->clients);
debug(20, 1) ("MemObject->nclients: %d\n",
mem->nclients);
debug(20, 1) ("MemObject->reply: %p\n",
/*
- * $Id: store_client.cc,v 1.102 2001/04/14 00:25:19 hno Exp $
+ * $Id: store_client.cc,v 1.103 2001/10/24 06:16:18 hno Exp $
*
* DEBUG: section 20 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
(void) 0; /* a match! */
else {
debug(20, 1) ("storeClientReadHeader: URL mismatch\n");
- debug(20, 1) ("\t{%s} != {%s}\n", t->value, mem->url);
+ debug(20, 1) ("\t{%s} != {%s}\n", (char *)t->value, mem->url);
swap_object_ok = 0;
break;
}
/*
- * $Id: store_digest.cc,v 1.49 2001/03/03 10:39:34 hno Exp $
+ * $Id: store_digest.cc,v 1.50 2001/10/24 06:16:18 hno Exp $
*
* DEBUG: section 71 Store Digest Manager
* AUTHOR: Alex Rousskov
}
store_digest = cacheDigestCreate(cap, Config.digest.bits_per_entry);
debug(71, 1) ("Local cache digest enabled; rebuild/rewrite every %d/%d sec\n",
- Config.digest.rebuild_period, Config.digest.rewrite_period);
+ (int)Config.digest.rebuild_period, (int)Config.digest.rewrite_period);
memset(&sd_state, 0, sizeof(sd_state));
cachemgrRegister("store_digest", "Store Digest",
storeDigestReport, 0, 1);
/* Note: We should use the time of the next rebuild, not (cur_time+period) */
if (refreshCheckDigest(e, Config.digest.rebuild_period)) {
debug(71, 6) ("storeDigestAdd: entry expires within %d secs, ignoring\n",
- Config.digest.rebuild_period);
+ (int)Config.digest.rebuild_period);
return 0;
}
/*
httpReplySetHeaders(e->mem_obj->reply, version, 200, "Cache Digest OK",
"application/cache-digest", store_digest->mask_size + sizeof(sd_state.cblock),
squid_curtime, squid_curtime + Config.digest.rewrite_period);
- debug(71, 3) ("storeDigestRewrite: entry expires on %d (%+d)\n",
- e->mem_obj->reply->expires, e->mem_obj->reply->expires - squid_curtime);
+ debug(71, 3) ("storeDigestRewrite: entry expires on %ld (%+d)\n",
+ (long int)e->mem_obj->reply->expires, (int)(e->mem_obj->reply->expires - squid_curtime));
storeBuffer(e);
httpReplySwapOut(e->mem_obj->reply, e);
storeDigestCBlockSwapOut(e);
assert(sd_state.rewrite_lock && e == sd_state.rewrite_lock->data);
storeComplete(e);
storeTimestampsSet(e);
- debug(71, 2) ("storeDigestRewriteFinish: digest expires at %d (%+d)\n",
- e->expires, e->expires - squid_curtime);
+ debug(71, 2) ("storeDigestRewriteFinish: digest expires at %ld (%+d)\n",
+ (long int)e->expires, (int)(e->expires - squid_curtime));
/* is this the write order? @?@ */
requestUnlink(e->mem_obj->request);
e->mem_obj->request = NULL;