/*
- * $Id: HttpHdrContRange.cc,v 1.13 2001/01/12 00:37:13 wessels Exp $
+ * $Id: HttpHdrContRange.cc,v 1.14 2001/10/24 08:19:07 hno Exp $
*
* DEBUG: section 68 HTTP Content-Range Header
* AUTHOR: Alex Rousskov
}
/* we managed to parse, check if the result makes sence */
if (known_spec(spec->length) && !spec->length) {
- debug(68, 2) ("invalid range (%d += %d) in resp-range-spec near: '%s'\n",
- spec->offset, spec->length, field);
+ debug(68, 2) ("invalid range (%ld += %ld) in resp-range-spec near: '%s'\n",
+ (long int) spec->offset, (long int) spec->length, field);
return 0;
}
return 1;
if (!known_spec(spec->offset) || !known_spec(spec->length))
packerPrintf(p, "*");
else
- packerPrintf(p, "bytes %d-%d",
- spec->offset, spec->offset + spec->length - 1);
+ packerPrintf(p, "bytes %ld-%ld",
+ (long int) spec->offset, (long int) spec->offset + spec->length - 1);
}
/*
range->elength = range_spec_unknown;
else if (!httpHeaderParseSize(p, &range->elength))
return 0;
- debug(68, 8) ("parsed content-range field: %d-%d / %d\n",
- range->spec.offset, range->spec.offset + range->spec.length - 1,
- range->elength);
+ debug(68, 8) ("parsed content-range field: %ld-%ld / %ld\n",
+ (long int) range->spec.offset, (long int) range->spec.offset + range->spec.length - 1,
+ (long int) range->elength);
return 1;
}
if (!known_spec(range->elength))
packerPrintf(p, "/*");
else
- packerPrintf(p, "/%d", range->elength);
+ packerPrintf(p, "/%ld", (long int) range->elength);
}
void
/*
- * $Id: HttpHdrRange.cc,v 1.25 2001/02/07 18:56:51 hno Exp $
+ * $Id: HttpHdrRange.cc,v 1.26 2001/10/24 08:19:07 hno Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
httpHdrRangeSpecPackInto(const HttpHdrRangeSpec * spec, Packer * p)
{
if (!known_spec(spec->offset)) /* suffix */
- packerPrintf(p, "-%d", spec->length);
+ packerPrintf(p, "-%ld", (long int) spec->length);
else if (!known_spec(spec->length)) /* trailer */
- packerPrintf(p, "%d-", spec->offset);
+ packerPrintf(p, "%ld-", (long int) spec->offset);
else /* range */
- packerPrintf(p, "%d-%d",
- spec->offset, spec->offset + spec->length - 1);
+ packerPrintf(p, "%ld-%ld",
+ (long int) spec->offset, (long int) spec->offset + spec->length - 1);
}
/* fills "absent" positions in range specification based on response body size
static int
httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen)
{
- debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%d, %d) len: %d\n",
- spec->offset, spec->offset + spec->length, spec->length);
+ debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%ld, %ld) len: %ld\n",
+ (long int) spec->offset, (long int) spec->offset + spec->length, (long int) spec->length);
if (!known_spec(spec->offset)) /* suffix */
spec->offset = size_diff(clen, spec->length);
else if (!known_spec(spec->length)) /* trailer */
assert(known_spec(spec->offset));
spec->length = size_min(size_diff(clen, spec->offset), spec->length);
/* check range validity */
- debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%d, %d) len: %d\n",
- spec->offset, spec->offset + spec->length, spec->length);
+ debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%ld, %ld) len: %ld\n",
+ (long int) spec->offset, (long int) spec->offset + (long int) spec->length, (long int) spec->length);
return spec->length > 0;
}
assert(range);
assert(clen >= 0);
stackInit(&goods);
- debug(64, 3) ("httpHdrRangeCanonize: started with %d specs, clen: %d\n", range->specs.count, clen);
+ debug(64, 3) ("httpHdrRangeCanonize: started with %d specs, clen: %ld\n", range->specs.count, (long int) clen);
/* canonize each entry and destroy bad ones if any */
while ((spec = httpHdrRangeGetSpec(range, &pos))) {
/*
- * $Id: HttpHeader.cc,v 1.73 2001/10/17 21:37:28 hno Exp $
+ * $Id: HttpHeader.cc,v 1.74 2001/10/24 08:19:07 hno Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
/* tmp hack to try to avoid coredumps */
if (e->id < 0 || e->id >= HDR_ENUM_END) {
debug(55, 0) ("httpHeaderClean BUG: entry[%d] is invalid (%d). Ignored.\n",
- pos, e->id);
+ (int) pos, e->id);
} else {
statHistCount(&HttpHeaderStats[hdr->owner].fieldTypeDistr, e->id);
/* yes, this destroy() leaves us in an incosistent state */
if (field_end - value_start > 65536) {
/* String has a 64K limit */
debug(55, 1) ("WARNING: ignoring '%s' header of %d bytes\n",
- strBuf(e->name), field_end - value_start);
+ strBuf(e->name), (int) (field_end - value_start));
if (e->id == HDR_OTHER)
stringClean(&e->name);
memFree(e, MEM_HTTP_HDR_ENTRY);
/*
- * $Id: HttpReply.cc,v 1.48 2001/08/16 00:16:15 hno Exp $
+ * $Id: HttpReply.cc,v 1.49 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
/* Allow - use this entry */
reply->maxBodySize = bs->maxsize;
bs = NULL;
- debug(58, 3) ("httpReplyBodyBuildSize: Setting maxBodySize to %d\n", reply->maxBodySize);
+ debug(58, 3) ("httpReplyBodyBuildSize: Setting maxBodySize to %ld\n", (long int) reply->maxBodySize);
}
aclChecklistFree(checklist);
}
/*
- * $Id: StatHist.cc,v 1.25 2001/01/12 00:37:14 wessels Exp $
+ * $Id: StatHist.cc,v 1.26 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 62 Generic Histogram
* AUTHOR: Duane Wessels
assert(Dest->val_in == Orig->val_in);
assert(Dest->val_out == Orig->val_out);
/* actual copy */
- debug(62, 3) ("statHistCopy: copying %d bytes to %p from %p\n",
- Dest->capacity * sizeof(*Dest->bins),
+ debug(62, 3) ("statHistCopy: copying %ld bytes to %p from %p\n",
+ (long int) Dest->capacity * sizeof(*Dest->bins),
Dest->bins,
Orig->bins);
xmemcpy(Dest->bins, Orig->bins, Dest->capacity * sizeof(*Dest->bins));
/*
- * $Id: http.cc,v 1.383 2001/10/17 20:25:02 hno Exp $
+ * $Id: http.cc,v 1.384 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
StoreEntry *entry = httpState->entry;
ErrorState *err;
debug(11, 5) ("httpSendComplete: FD %d: size %d: errflag %d.\n",
- fd, size, errflag);
+ fd, (int) size, errflag);
#if URL_CHECKSUM_DEBUG
assert(entry->mem_obj->chksum == url_checksum(entry->mem_obj->url));
#endif
StoreEntry *entry = httpState->entry;
ErrorState *err;
debug(11, 5) ("httpSendRequestEntry: FD %d: size %d: errflag %d.\n",
- fd, size, errflag);
+ fd, (int) size, errflag);
if (size > 0) {
fd_bytes(fd, size, FD_WRITE);
kb_incr(&statCounter.server.all.kbytes_out, size);
/*
- * $Id: ssl.cc,v 1.115 2001/10/10 15:17:42 adrian Exp $
+ * $Id: ssl.cc,v 1.116 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
size_t read_sz = SQUID_TCP_SO_RCVBUF - sslState->server.len;
assert(fd == sslState->server.fd);
debug(26, 3) ("sslReadServer: FD %d, reading %d bytes at offset %d\n",
- fd, read_sz, sslState->server.len);
+ fd, (int) read_sz, sslState->server.len);
errno = 0;
#if DELAY_POOLS
read_sz = delayBytesWanted(sslState->delay_id, 1, read_sz);
/*
- * $Id: stat.cc,v 1.350 2001/10/24 06:55:44 hno Exp $
+ * $Id: stat.cc,v 1.351 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
storeAppendPrintf(s, "log_type %s\n", log_tags[http->log_type]);
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);
+ storeAppendPrintf(s, "req_sz %ld\n", (long int) http->req_sz);
e = http->entry;
storeAppendPrintf(s, "entry %p/%s\n", e, e ? storeKeyText(e->hash.key) : "N/A");
e = http->old_entry;
/*
- * $Id: stmem.cc,v 1.69 2001/09/07 18:02:45 adrian Exp $
+ * $Id: stmem.cc,v 1.70 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 19 Store Memory Primitives
* AUTHOR: Harvest Derived
char *ptr_to_buf = NULL;
int bytes_from_this_packet = 0;
int bytes_into_this_packet = 0;
- debug(19, 6) ("memCopy: offset %d: size %d\n", (int) offset, size);
+ debug(19, 6) ("memCopy: offset %ld: size %d\n", (long int) offset, (int) size);
if (p == NULL)
return 0;
assert(size > 0);
/*
- * $Id: store.cc,v 1.543 2001/10/24 06:16:17 hno Exp $
+ * $Id: store.cc,v 1.544 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
}
if (store_swap_size > Config.Swap.maxSize) {
if (squid_curtime - last_warn_time > 10) {
- debug(20, 0) ("WARNING: Disk space over limit: %d KB > %d KB\n",
- store_swap_size, Config.Swap.maxSize);
+ debug(20, 0) ("WARNING: Disk space over limit: %ld KB > %ld KB\n",
+ (long int) store_swap_size, (long int) Config.Swap.maxSize);
last_warn_time = squid_curtime;
}
}
static void
storeInitHashValues(void)
{
- int i;
+ long int i;
/* Calculate size of hash table (maximum currently 64k buckets). */
i = Config.Swap.maxSize / Config.Store.avgObjectSize;
- debug(20, 1) ("Swap maxSize %d KB, estimated %d objects\n",
- Config.Swap.maxSize, i);
+ debug(20, 1) ("Swap maxSize %ld KB, estimated %ld objects\n",
+ (long int) Config.Swap.maxSize, i);
i /= Config.Store.objectsPerBucket;
- debug(20, 1) ("Target number of buckets: %d\n", i);
+ debug(20, 1) ("Target number of buckets: %ld\n", i);
/* ideally the full scan period should be configurable, for the
* moment it remains at approximately 24 hours. */
store_hash_buckets = storeKeyHashBuckets(i);
debug(20, 1) ("Using %d Store buckets\n", store_hash_buckets);
- debug(20, 1) ("Max Mem size: %d KB\n", Config.memMaxSize >> 10);
- debug(20, 1) ("Max Swap size: %d KB\n", Config.Swap.maxSize);
+ debug(20, 1) ("Max Mem size: %ld KB\n", (long int) Config.memMaxSize >> 10);
+ debug(20, 1) ("Max Swap size: %ld KB\n", (long int) Config.Swap.maxSize);
}
void
/*
- * $Id: store_client.cc,v 1.104 2001/10/24 06:55:44 hno Exp $
+ * $Id: store_client.cc,v 1.105 2001/10/24 08:19:09 hno Exp $
*
* DEBUG: section 20 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
assert(sc->flags.disk_io_pending);
sc->flags.disk_io_pending = 0;
assert(sc->callback != NULL);
- debug(20, 3) ("storeClientReadBody: len %d\n", len);
+ debug(20, 3) ("storeClientReadBody: len %d\n", (int) len);
if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
httpReplyParse(mem->reply, sc->copy_buf, headersEnd(sc->copy_buf, len));
storeClientCallback(sc, len);
assert(sc->flags.disk_io_pending);
sc->flags.disk_io_pending = 0;
assert(sc->callback != NULL);
- debug(20, 3) ("storeClientReadHeader: len %d\n", len);
+ debug(20, 3) ("storeClientReadHeader: len %d\n", (int) len);
if (len < 0) {
debug(20, 3) ("storeClientReadHeader: %s\n", xstrerror());
storeClientCallback(sc, len);
*/
copy_sz = XMIN(sc->copy_size, body_sz);
debug(20, 3) ("storeClientReadHeader: copying %d bytes of body\n",
- copy_sz);
+ (int) copy_sz);
xmemmove(sc->copy_buf, sc->copy_buf + swap_hdr_sz, copy_sz);
if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
httpReplyParse(mem->reply, sc->copy_buf,
/*
- * $Id: store_dir.cc,v 1.134 2001/08/16 00:16:18 hno Exp $
+ * $Id: store_dir.cc,v 1.135 2001/10/24 08:19:09 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
storeAppendPrintf(sentry, "Store Directory Statistics:\n");
storeAppendPrintf(sentry, "Store Entries : %d\n",
memInUse(MEM_STOREENTRY));
- storeAppendPrintf(sentry, "Maximum Swap Size : %8d KB\n",
- Config.Swap.maxSize);
+ storeAppendPrintf(sentry, "Maximum Swap Size : %8ld KB\n",
+ (long int) Config.Swap.maxSize);
storeAppendPrintf(sentry, "Current Store Swap Size: %8d KB\n",
store_swap_size);
storeAppendPrintf(sentry, "Current Capacity : %d%% used, %d%% free\n",
store_io_stats.create.select_fail++;
return NULL;
}
- debug(20, 2) ("storeCreate: Selected dir '%d' for obj size '%d'\n", dirn, objsize);
+ debug(20, 2) ("storeCreate: Selected dir '%d' for obj size '%ld'\n", dirn, (long int) objsize);
SD = &Config.cacheSwap.swapDirs[dirn];
/* Now that we have a fs to use, call its storeCreate function */
/*
- * $Id: store_swapout.cc,v 1.82 2001/06/27 00:14:11 wessels Exp $
+ * $Id: store_swapout.cc,v 1.83 2001/10/24 08:19:09 hno Exp $
*
* DEBUG: section 20 Storage Manager Swapout Functions
* AUTHOR: Duane Wessels
debug(20, 3) ("storeSwapOut: swap_buf_len = %d\n", (int) swap_buf_len);
assert(swap_buf_len > 0);
- debug(20, 3) ("storeSwapOut: swapping out %d bytes from %d\n",
- swap_buf_len, (int) mem->swapout.queue_offset);
+ debug(20, 3) ("storeSwapOut: swapping out %ld bytes from %ld\n",
+ (long int) swap_buf_len, (long int) mem->swapout.queue_offset);
mem->swapout.queue_offset += swap_buf_len;
storeWrite(mem->swapout.sio, mem->swapout.memnode->data, swap_buf_len, -1, NULL);
/* the storeWrite() call might generate an error */
/*
- * $Id: tunnel.cc,v 1.115 2001/10/10 15:17:42 adrian Exp $
+ * $Id: tunnel.cc,v 1.116 2001/10/24 08:19:08 hno Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
size_t read_sz = SQUID_TCP_SO_RCVBUF - sslState->server.len;
assert(fd == sslState->server.fd);
debug(26, 3) ("sslReadServer: FD %d, reading %d bytes at offset %d\n",
- fd, read_sz, sslState->server.len);
+ fd, (int) read_sz, sslState->server.len);
errno = 0;
#if DELAY_POOLS
read_sz = delayBytesWanted(sslState->delay_id, 1, read_sz);
/*
- * $Id: urn.cc,v 1.67 2001/03/03 10:39:34 hno Exp $
+ * $Id: urn.cc,v 1.68 2001/10/24 08:19:09 hno Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
int urlcnt = 0;
http_version_t version;
- debug(52, 3) ("urnHandleReply: Called with size=%d.\n", size);
+ debug(52, 3) ("urnHandleReply: Called with size=%d.\n", (int) size);
if (EBIT_TEST(urlres_e->flags, ENTRY_ABORTED)) {
memFree(buf, MEM_4K_BUF);
return;
/*
- * $Id: wais.cc,v 1.137 2001/04/14 00:03:24 hno Exp $
+ * $Id: wais.cc,v 1.138 2001/10/24 08:19:09 hno Exp $
*
* DEBUG: section 24 WAIS Relay
* AUTHOR: Harvest Derived
WaisStateData *waisState = data;
StoreEntry *entry = waisState->entry;
debug(24, 5) ("waisSendComplete: FD %d size: %d errflag: %d\n",
- fd, size, errflag);
+ fd, (int) size, errflag);
if (size > 0) {
fd_bytes(fd, size, FD_WRITE);
kb_incr(&statCounter.server.all.kbytes_out, size);