From: wessels <> Date: Mon, 30 Apr 2007 22:56:09 +0000 (+0000) Subject: Removed casts from numeric types in debugs() statements. X-Git-Tag: SQUID_3_0_PRE6~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a7a3d56318aa1e87fb553cf353d4a2c995be387;p=thirdparty%2Fsquid.git Removed casts from numeric types in debugs() statements. After converting debug to debugs, there were quite a few instances of casts left over. I removed casts for int, unsigned, long, and one double. --- diff --git a/src/ACLMaxUserIP.cc b/src/ACLMaxUserIP.cc index 1cb109acad..58b5340b2e 100644 --- a/src/ACLMaxUserIP.cc +++ b/src/ACLMaxUserIP.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLMaxUserIP.cc,v 1.12 2007/04/28 22:26:37 hno Exp $ + * $Id: ACLMaxUserIP.cc,v 1.13 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -104,7 +104,7 @@ ACLMaxUserIP::parse() maximum = xatoi(t); - debugs(28, 5, "aclParseUserMaxIP: Max IP address's " << (int) maximum); + debugs(28, 5, "aclParseUserMaxIP: Max IP address's " << maximum); return; } diff --git a/src/ACLTimeData.cc b/src/ACLTimeData.cc index 57c344463e..b8b853d99e 100644 --- a/src/ACLTimeData.cc +++ b/src/ACLTimeData.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLTimeData.cc,v 1.14 2007/04/28 22:26:37 hno Exp $ + * $Id: ACLTimeData.cc,v 1.15 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -86,8 +86,8 @@ ACLTimeData::match(time_t when) ACLTimeData *data = this; while (data) { - debugs(28, 3, "aclMatchTime: checking " << (int) t << " in " << - (int) data->start << "-" << (int) data->stop << ", weekbits=" << + debugs(28, 3, "aclMatchTime: checking " << t << " in " << + data->start << "-" << data->stop << ", weekbits=" << std::hex << data->weekbits); if (t >= data->start && t <= data->stop && (data->weekbits & (1 << tm.tm_wday))) diff --git a/src/AuthUser.cc b/src/AuthUser.cc index 058b95ec5b..172ac828fa 100644 --- a/src/AuthUser.cc +++ b/src/AuthUser.cc @@ -1,6 +1,6 @@ /* - * $Id: AuthUser.cc,v 1.4 2007/04/28 22:26:37 hno Exp $ + * $Id: AuthUser.cc,v 1.5 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -58,7 +58,7 @@ AuthUser::AuthUser (AuthConfig *aConfig) : proxy_match_cache.head = proxy_match_cache.tail = NULL; ip_list.head = ip_list.tail = NULL; requests.head = requests.tail = NULL; - debugs(29, 5, "AuthUser::AuthUser: Initialised auth_user '" << this << "' with refcount '" << (long int) references << "'."); + debugs(29, 5, "AuthUser::AuthUser: Initialised auth_user '" << this << "' with refcount '" << references << "'."); } /* Combine two user structs. ONLY to be called from within a scheme @@ -97,7 +97,7 @@ AuthUser::~AuthUser() { auth_user_request_t *auth_user_request; dlink_node *link, *tmplink; - debugs(29, 5, "AuthUser::~AuthUser: Freeing auth_user '" << this << "' with refcount '" << (long int) references << "'."); + debugs(29, 5, "AuthUser::~AuthUser: Freeing auth_user '" << this << "' with refcount '" << references << "'."); assert(references == 0); /* were they linked in by username ? */ @@ -185,7 +185,7 @@ AuthUser::cacheCleanup(void *datanotused) auth_user_t *auth_user; char const *username = NULL; debugs(29, 3, "AuthUser::cacheCleanup: Cleaning the user cache now"); - debugs(29, 3, "AuthUser::cacheCleanup: Current time: " << (long int) current_time.tv_sec); + debugs(29, 3, "AuthUser::cacheCleanup: Current time: " << current_time.tv_sec); hash_first(proxy_auth_username_cache); while ((usernamehash = ((AuthUserHashPointer *) hash_next(proxy_auth_username_cache)))) { @@ -327,7 +327,7 @@ AuthUser::lock() debugs(29, 9, "authenticateAuthUserLock auth_user '" << this << "'."); assert(this != NULL); references++; - debugs(29, 9, "authenticateAuthUserLock auth_user '" << this << "' now at '" << (long int) references << "'."); + debugs(29, 9, "authenticateAuthUserLock auth_user '" << this << "' now at '" << references << "'."); } void @@ -342,7 +342,7 @@ AuthUser::unlock() debugs(29, 1, "Attempt to lower Auth User " << this << " refcount below 0!"); } - debugs(29, 9, "authenticateAuthUserUnlock auth_user '" << this << "' now at '" << (long int) references << "'."); + debugs(29, 9, "authenticateAuthUserUnlock auth_user '" << this << "' now at '" << references << "'."); if (references == 0) delete this; diff --git a/src/AuthUserRequest.cc b/src/AuthUserRequest.cc index f908dbd634..16e5f6c5fc 100644 --- a/src/AuthUserRequest.cc +++ b/src/AuthUserRequest.cc @@ -1,6 +1,6 @@ /* - * $Id: AuthUserRequest.cc,v 1.13 2007/04/28 22:26:37 hno Exp $ + * $Id: AuthUserRequest.cc,v 1.14 2007/04/30 16:56:09 wessels Exp $ * * DO NOT MODIFY NEXT 2 LINES: * arch-tag: 6803fde1-d5a2-4c29-9034-1c0c9f650eb4 @@ -690,7 +690,7 @@ void AuthUserRequest::lock() { - debugs(29, 9, "AuthUserRequest::lock: auth_user request '" << this << "' (" << (long int) references << " references)."); + debugs(29, 9, "AuthUserRequest::lock: auth_user request '" << this << "' (" << references << " references)."); assert(this); ++references; } @@ -698,7 +698,7 @@ AuthUserRequest::lock() void AuthUserRequest::unlock() { - debugs(29, 9, "AuthUserRequest::unlock: auth_user request '" << this << "' (" << (long int) references << " references) ."); + debugs(29, 9, "AuthUserRequest::unlock: auth_user request '" << this << "' (" << references << " references) ."); assert(this != NULL); if (references > 0) { diff --git a/src/DiskIO/Blocking/BlockingFile.cc b/src/DiskIO/Blocking/BlockingFile.cc index 68d0a5e2da..aebb8ba25b 100644 --- a/src/DiskIO/Blocking/BlockingFile.cc +++ b/src/DiskIO/Blocking/BlockingFile.cc @@ -1,6 +1,6 @@ /* - * $Id: BlockingFile.cc,v 1.3 2007/04/28 22:26:44 hno Exp $ + * $Id: BlockingFile.cc,v 1.4 2007/04/30 16:56:11 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Robert Collins @@ -212,7 +212,7 @@ void BlockingFile::writeDone(int rvfd, int errflag, size_t len) { assert (rvfd == fd); - debugs(79, 3, "storeUfsWriteDone: FD " << fd << ", len " << (long int) len); + debugs(79, 3, "storeUfsWriteDone: FD " << fd << ", len " << len); WriteRequest::Pointer result = writeRequest; writeRequest = NULL; diff --git a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc index e3a25cc113..9b7bc95eca 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc @@ -1,6 +1,6 @@ /* - * $Id: DiskThreadsDiskFile.cc,v 1.9 2007/04/28 22:26:47 hno Exp $ + * $Id: DiskThreadsDiskFile.cc,v 1.10 2007/04/30 16:56:13 wessels Exp $ * * DEBUG: section 79 Disk IO Routines * AUTHOR: Robert Collins @@ -354,7 +354,7 @@ DiskThreadsDiskFile::writeDone (int rvfd, int errflag, size_t len, WriteRequest: #endif - debugs(79, 3, "DiskThreadsDiskFile::writeDone: FD " << fd << ", len " << (long int) len << ", err=" << errflag); + debugs(79, 3, "DiskThreadsDiskFile::writeDone: FD " << fd << ", len " << len << ", err=" << errflag); assert(++loop_detect < 10); diff --git a/src/HttpHdrContRange.cc b/src/HttpHdrContRange.cc index ea0647de14..bc5d21a8b1 100644 --- a/src/HttpHdrContRange.cc +++ b/src/HttpHdrContRange.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrContRange.cc,v 1.18 2007/04/28 22:26:37 hno Exp $ + * $Id: HttpHdrContRange.cc,v 1.19 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 68 HTTP Content-Range Header * AUTHOR: Alex Rousskov @@ -101,7 +101,7 @@ httpHdrRangeRespSpecParseInit(HttpHdrRangeSpec * spec, const char *field, int fl /* we managed to parse, check if the result makes sence */ if (known_spec((size_t)spec->length) && spec->length == 0) { - debugs(68, 2, "invalid range (" << (long int) spec->offset << " += " << + debugs(68, 2, "invalid range (" << spec->offset << " += " << (long int) spec->length << ") in resp-range-spec near: '" << field << "'"); return 0; } diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index 817eab212d..e0844e4789 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrRange.cc,v 1.41 2007/04/28 22:26:37 hno Exp $ + * $Id: HttpHdrRange.cc,v 1.42 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov @@ -593,12 +593,12 @@ HttpHdrRangeIter::updateSpec() ssize_t HttpHdrRangeIter::debt() const { - debugs(64, 3, "HttpHdrRangeIter::debt: debt is " << (int)debt_size); + debugs(64, 3, "HttpHdrRangeIter::debt: debt is " << debt_size); return debt_size; } void HttpHdrRangeIter::debt(ssize_t newDebt) { - debugs(64, 3, "HttpHdrRangeIter::debt: was " << (int)debt_size << " now " << (int)newDebt); + debugs(64, 3, "HttpHdrRangeIter::debt: was " << debt_size << " now " << newDebt); debt_size = newDebt; } diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 0726d46b4c..33dd918578 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.129 2007/04/28 22:26:37 hno Exp $ + * $Id: HttpHeader.cc,v 1.130 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1444,7 +1444,7 @@ HttpHeaderEntry::parse(const char *field_start, const char *field_end) if (field_end - value_start > 65534) { /* String must be LESS THAN 64K and it adds a terminating NULL */ - debugs(55, 1, "WARNING: ignoring '" << name.buf() << "' header of " << (int) (field_end - value_start) << " bytes"); + debugs(55, 1, "WARNING: ignoring '" << name.buf() << "' header of " << (field_end - value_start) << " bytes"); if (id == HDR_OTHER) name.clean(); diff --git a/src/HttpRequestMethod.cc b/src/HttpRequestMethod.cc index 6a96122171..2781c5610c 100644 --- a/src/HttpRequestMethod.cc +++ b/src/HttpRequestMethod.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpRequestMethod.cc,v 1.3 2007/04/28 22:26:37 hno Exp $ + * $Id: HttpRequestMethod.cc,v 1.4 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 73 HTTP Request * AUTHOR: Duane Wessels @@ -154,7 +154,7 @@ HttpRequestMethod::AddExtension(const char *mstr) /* Don't free statically allocated "%EXTnn" string */ RequestMethodStr[method] = xstrdup(mstr); - debugs(23, 1, "Extension method '" << mstr << "' added, enum=" << (int) method); + debugs(23, 1, "Extension method '" << mstr << "' added, enum=" << method); return; } diff --git a/src/LeakFinder.cc b/src/LeakFinder.cc index 4ccbcf5661..235539475f 100644 --- a/src/LeakFinder.cc +++ b/src/LeakFinder.cc @@ -1,6 +1,6 @@ /* - * $Id: LeakFinder.cc,v 1.5 2007/04/28 22:26:37 hno Exp $ + * $Id: LeakFinder.cc,v 1.6 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 45 Callback Data Registry * AUTHOR: Duane Wessels @@ -138,7 +138,7 @@ LeakFinder::dump() LeakFinderPtr *c; while ((c = (LeakFinderPtr *)hash_next(table))) { - debugs(45, 1, std::setw(20) << c->key << " last used " << std::setw(9) << (int)(squid_curtime - c->when) << + debugs(45, 1, std::setw(20) << c->key << " last used " << std::setw(9) << (squid_curtime - c->when) << " seconds ago by " << c->file << ":" << c->line); } } diff --git a/src/MemObject.cc b/src/MemObject.cc index 8c516c5962..6367a89fe8 100644 --- a/src/MemObject.cc +++ b/src/MemObject.cc @@ -1,6 +1,6 @@ /* - * $Id: MemObject.cc,v 1.25 2007/04/28 22:26:37 hno Exp $ + * $Id: MemObject.cc,v 1.26 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 19 Store Memory Primitives * AUTHOR: Robert Collins @@ -138,7 +138,7 @@ void MemObject::write ( StoreIOBuffer writeBuffer, STMCB *callback, void *callbackData) { PROF_start(MemObject_write); - debugs(19, 6, "memWrite: offset " << (unsigned long)writeBuffer.offset << " len " << (long)writeBuffer.length); + debugs(19, 6, "memWrite: offset " << writeBuffer.offset << " len " << writeBuffer.length); /* the offset is into the content, not the headers */ writeBuffer.offset += (_reply ? _reply->hdr_sz : 0); @@ -162,9 +162,9 @@ MemObject::dump() const debugs(20, 1, "MemObject->data.origin_offset: " << (data_hdr.head ? data_hdr.head->nodeBuffer.offset : 0)); #endif - debugs(20, 1, "MemObject->start_ping: " << (int) start_ping.tv_sec << "."<< std::setfill('0') << std::setw(6) << (int) start_ping.tv_usec); - debugs(20, 1, "MemObject->inmem_hi: " << (int) data_hdr.endOffset()); - debugs(20, 1, "MemObject->inmem_lo: " << (int) inmem_lo); + debugs(20, 1, "MemObject->start_ping: " << start_ping.tv_sec << "."<< std::setfill('0') << std::setw(6) << start_ping.tv_usec); + debugs(20, 1, "MemObject->inmem_hi: " << data_hdr.endOffset()); + debugs(20, 1, "MemObject->inmem_lo: " << inmem_lo); debugs(20, 1, "MemObject->nclients: " << nclients); debugs(20, 1, "MemObject->reply: " << _reply); debugs(20, 1, "MemObject->request: " << request); diff --git a/src/Server.cc b/src/Server.cc index e1b7f31ec8..593ec9b174 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -1,5 +1,5 @@ /* - * $Id: Server.cc,v 1.9 2007/04/28 22:26:37 hno Exp $ + * $Id: Server.cc,v 1.10 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: * AUTHOR: Duane Wessels @@ -226,7 +226,7 @@ ServerStateData::sentRequestBodyWrapper(int fd, char *bufnotused, size_t size, c void ServerStateData::sentRequestBody(int fd, size_t size, comm_err_t errflag) { - debugs(11, 5, "sentRequestBody: FD " << fd << ": size " << (int) size << ": errflag " << errflag << "."); + debugs(11, 5, "sentRequestBody: FD " << fd << ": size " << size << ": errflag " << errflag << "."); debugs(32,3,HERE << "sentRequestBody called"); requestSender = NULL; diff --git a/src/StoreMetaUnpacker.cc b/src/StoreMetaUnpacker.cc index c6ce4552b3..91e267c564 100644 --- a/src/StoreMetaUnpacker.cc +++ b/src/StoreMetaUnpacker.cc @@ -1,6 +1,6 @@ /* - * $Id: StoreMetaUnpacker.cc,v 1.4 2007/04/28 22:26:37 hno Exp $ + * $Id: StoreMetaUnpacker.cc,v 1.5 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapfile Unpacker * AUTHOR: Robert Collins @@ -92,7 +92,7 @@ StoreMetaUnpacker::doOneEntry() if (position + length > *hdr_len) { debugs(20, 0, "storeSwapMetaUnpack: overflow!"); - debugs(20, 0, "\ttype=" << type << ", length=" << length << ", *hdr_len=" << *hdr_len << ", offset=" << (int) position); + debugs(20, 0, "\ttype=" << type << ", length=" << length << ", *hdr_len=" << *hdr_len << ", offset=" << position); return false; } diff --git a/src/SwapDir.cc b/src/SwapDir.cc index 8fff7c4482..32a5c6d0ce 100644 --- a/src/SwapDir.cc +++ b/src/SwapDir.cc @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.cc,v 1.10 2007/04/28 22:26:37 hno Exp $ + * $Id: SwapDir.cc,v 1.11 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 20 Swap Dir base object * AUTHOR: Robert Collins @@ -248,7 +248,7 @@ SwapDir::optionMaxSizeParse(char const *option, const char *value, int reconfigu ssize_t size = xatoi(value); if (reconfiguring && max_objsize != size) - debugs(3, 1, "Cache dir '" << path << "' max object size now " << (long int) size); + debugs(3, 1, "Cache dir '" << path << "' max object size now " << size); max_objsize = size; diff --git a/src/asn.cc b/src/asn.cc index fe1bb19993..c3fcee7db8 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,6 +1,6 @@ /* - * $Id: asn.cc,v 1.111 2007/04/28 22:26:37 hno Exp $ + * $Id: asn.cc,v 1.112 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -350,7 +350,7 @@ asHandleReply(void *data, StoreIOBuffer result) asState->reqofs = leftoversz; - debugs(53, 3, "asState->offset = " << (long int) asState->offset); + debugs(53, 3, "asState->offset = " << asState->offset); if (e->store_status == STORE_PENDING) { debugs(53, 3, "asHandleReply: store_status == STORE_PENDING: " << e->url() ); diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 898bfaa1c2..28b58b46af 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: auth_digest.cc,v 1.51 2007/04/28 22:26:49 hno Exp $ + * $Id: auth_digest.cc,v 1.52 2007/04/30 16:56:15 wessels Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -173,7 +173,7 @@ authenticateDigestNonceNew(void) /* the cache's link */ authDigestNonceLink(newnonce); newnonce->flags.incache = 1; - debugs(29, 5, "authenticateDigestNonceNew: created nonce " << newnonce << " at " << (long int) newnonce->noncedata.creationtime); + debugs(29, 5, "authenticateDigestNonceNew: created nonce " << newnonce << " at " << newnonce->noncedata.creationtime); return newnonce; } @@ -253,12 +253,12 @@ authenticateDigestNonceCacheCleanup(void *data) */ digest_nonce_h *nonce; debugs(29, 3, "authenticateDigestNonceCacheCleanup: Cleaning the nonce cache now"); - debugs(29, 3, "authenticateDigestNonceCacheCleanup: Current time: " << (long int) current_time.tv_sec); + debugs(29, 3, "authenticateDigestNonceCacheCleanup: Current time: " << current_time.tv_sec); hash_first(digest_nonce_cache); while ((nonce = ((digest_nonce_h *) hash_next(digest_nonce_cache)))) { debugs(29, 3, "authenticateDigestNonceCacheCleanup: nonce entry : " << nonce << " '" << (char *) nonce->key << "'"); - debugs(29, 4, "authenticateDigestNonceCacheCleanup: Creation time: " << (long int) nonce->noncedata.creationtime); + debugs(29, 4, "authenticateDigestNonceCacheCleanup: Creation time: " << nonce->noncedata.creationtime); if (authDigestNonceIsStale(nonce)) { debugs(29, 4, "authenticateDigestNonceCacheCleanup: Removing nonce " << (char *) nonce->key << " from cache due to timeout."); @@ -393,9 +393,9 @@ authDigestNonceIsStale(digest_nonce_h * nonce) /* has it's max duration expired? */ if (nonce->noncedata.creationtime + digestConfig.noncemaxduration < current_time.tv_sec) { debugs(29, 4, "authDigestNonceIsStale: Nonce is too old. " << - (long int) nonce->noncedata.creationtime << " " << - (int) digestConfig.noncemaxduration << " " << - (long int) current_time.tv_sec); + nonce->noncedata.creationtime << " " << + digestConfig.noncemaxduration << " " << + current_time.tv_sec); nonce->flags.valid = 0; return -1; diff --git a/src/client_side.cc b/src/client_side.cc index dabb2b9c07..8ff53e28d4 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.751 2007/04/28 22:26:37 hno Exp $ + * $Id: client_side.cc,v 1.752 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -831,7 +831,7 @@ static void clientPackTermBound(String boundary, MemBuf * mb) { mb->Printf("\r\n--%s--\r\n", boundary.buf()); - debugs(33, 6, "clientPackTermBound: buf offset: " << (long int) mb->size); + debugs(33, 6, "clientPackTermBound: buf offset: " << mb->size); } /* appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */ @@ -906,7 +906,7 @@ ClientSocketContext::packRange(StoreIOBuffer const &source, MemBuf * mb) /* * append content */ - debugs(33, 3, "clientPackRange: appending " << (long int) copy_sz << " bytes"); + debugs(33, 3, "clientPackRange: appending " << copy_sz << " bytes"); noteSentBodyBytes (copy_sz); @@ -983,7 +983,7 @@ ClientHttpRequest::mRangeCLen() /* account for range content */ clen += (*pos)->length; - debugs(33, 6, "clientMRangeCLen: (clen += " << (long int) mb.size << " + " << (long int) (*pos)->length << ") == " << clen); + debugs(33, 6, "clientMRangeCLen: (clen += " << mb.size << " + " << (*pos)->length << ") == " << clen); ++pos; } @@ -1987,7 +1987,7 @@ ConnStateData::makeSpaceAvailable() { if (getAvailableBufferLength() < 2) { in.buf = (char *)memReallocBuf(in.buf, in.allocatedSize * 2, &in.allocatedSize); - debugs(33, 2, "growing request buffer: notYetUsed=" << (long) in.notYetUsed << " size=" << (long) in.allocatedSize); + debugs(33, 2, "growing request buffer: notYetUsed=" << in.notYetUsed << " size=" << in.allocatedSize); } } @@ -2084,8 +2084,8 @@ connCancelIncompleteRequests(ConnStateData::Pointer & conn) ClientSocketContext *context = parseHttpRequestAbort(conn, "error:request-too-large"); clientStreamNode *node = context->getClientReplyContext(); assert(!connKeepReadingIncompleteRequest(conn)); - debugs(33, 1, "Request header is too large (" << (unsigned) conn->in.notYetUsed << " bytes)"); - debugs(33, 1, "Config 'request_header_max_size'= " << (long int) Config.maxRequestHeaderSize << " bytes."); + debugs(33, 1, "Request header is too large (" << conn->in.notYetUsed << " bytes)"); + debugs(33, 1, "Config 'request_header_max_size'= " << Config.maxRequestHeaderSize << " bytes."); clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); assert (repContext); repContext->setReplyToError(ERR_TOO_BIG, diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 501a89832f..78726d80e5 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.121 2007/04/28 22:26:37 hno Exp $ + * $Id: client_side_reply.cc,v 1.122 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -265,7 +265,7 @@ clientReplyContext::processExpired() #endif http->request->lastmod = old_entry->lastmod; - debugs(88, 5, "clientReplyContext::processExpired : lastmod " << (long int) entry->lastmod ); + debugs(88, 5, "clientReplyContext::processExpired : lastmod " << entry->lastmod ); http->storeEntry(entry); assert(http->out.offset == 0); @@ -451,7 +451,7 @@ clientReplyContext::cacheHit(StoreIOBuffer result) HttpRequest *r = http->request; - debugs(88, 3, "clientCacheHit: " << http->uri << ", " << (unsigned int)result.length << " bytes"); + debugs(88, 3, "clientCacheHit: " << http->uri << ", " << result.length << " bytes"); if (http->storeEntry() == NULL) { debugs(88, 3, "clientCacheHit: request aborted"); @@ -1045,7 +1045,7 @@ clientHttpRequestStatus(int fd, ClientHttpRequest const *http) if (http->out.size > 0x7FFF0000) { debugs(88, 1, "WARNING: closing FD " << fd << " to prevent counter overflow" ); debugs(88, 1, "\tclient " << (inet_ntoa(http->getConn() != NULL ? http->getConn()->peer.sin_addr : no_addr)) ); - debugs(88, 1, "\treceived " << (int) http->out.size << " bytes" ); + debugs(88, 1, "\treceived " << http->out.size << " bytes" ); debugs(88, 1, "\tURI " << http->log_uri ); return 1; } @@ -1055,7 +1055,7 @@ clientHttpRequestStatus(int fd, ClientHttpRequest const *http) if (http->out.offset > 0x7FFF0000) { debugs(88, 1, "WARNING: closing FD " << fd << " to prevent counter overflow" ); debugs(88, 1, "\tclient " << (inet_ntoa(http->getConn() != NULL ? http->getConn()->peer.sin_addr : no_addr)) ); - debugs(88, 1, "\treceived " << (int) http->out.size << " bytes (offset " << (int) http->out.offset << ")" ); + debugs(88, 1, "\treceived " << http->out.size << " bytes (offset " << http->out.offset << ")" ); debugs(88, 1, "\tURI " << http->log_uri ); return 1; } @@ -1721,7 +1721,7 @@ clientReplyContext::buildMaxBodySize(HttpReply * reply) for (l = Config.ReplyBodySize; l; l = l -> next) { if (ch->matchAclListFast(l->aclList)) { if (l->size != static_cast(-1)) { - debugs(58, 3, "clientReplyContext: Setting maxBodySize to " << (long int) l->size); + debugs(58, 3, "clientReplyContext: Setting maxBodySize to " << l->size); http->maxReplyBodySize(l->size); } @@ -1928,7 +1928,7 @@ clientReplyContext::sendMoreData (StoreIOBuffer result) debugs(88, 5, "clientReplyContext::sendMoreData: " << http->uri << ", " << (int) reqofs << " bytes (" << (unsigned int)result.length << " new bytes)"); - debugs(88, 5, "clientReplyContext::sendMoreData: FD " << fd << " '" << entry->url() << "', out.offset=" << (long int) http->out.offset << " " ); + debugs(88, 5, "clientReplyContext::sendMoreData: FD " << fd << " '" << entry->url() << "', out.offset=" << http->out.offset << " " ); /* update size of the request */ reqsize = reqofs; diff --git a/src/comm.cc b/src/comm.cc index 02014d8a1c..c59ddae043 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.429 2007/04/28 22:26:37 hno Exp $ + * $Id: comm.cc,v 1.430 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -775,7 +775,7 @@ comm_local_port(int fd) } F->local_port = ntohs(addr.sin_port); - debugs(5, 6, "comm_local_port: FD " << fd << ": port " << (int) F->local_port); + debugs(5, 6, "comm_local_port: FD " << fd << ": port " << F->local_port); return F->local_port; } @@ -966,7 +966,7 @@ void commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data) { ConnectStateData *cs; - debugs(5, 3, "commConnectStart: FD " << fd << ", data " << data << ", " << host << ":" << (int) port); + debugs(5, 3, "commConnectStart: FD " << fd << ", data " << data << ", " << host << ":" << port); cs = new ConnectStateData; cs->fd = fd; cs->host = xstrdup(host); diff --git a/src/comm_poll.cc b/src/comm_poll.cc index 62e8ea85f9..cc4a58a01b 100644 --- a/src/comm_poll.cc +++ b/src/comm_poll.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_poll.cc,v 1.20 2007/04/28 22:26:37 hno Exp $ + * $Id: comm_poll.cc,v 1.21 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 5 Socket Functions * @@ -629,7 +629,7 @@ comm_select(int msec) return COMM_OK; } while (timeout > current_dtime); - debugs(5, 8, "comm_poll: time out: " << (long int) squid_curtime << "."); + debugs(5, 8, "comm_poll: time out: " << squid_curtime << "."); return COMM_TIMEOUT; } diff --git a/src/comm_select.cc b/src/comm_select.cc index dac549407f..8eaa17ada0 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select.cc,v 1.78 2007/04/28 22:26:37 hno Exp $ + * $Id: comm_select.cc,v 1.79 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 5 Socket Functions * @@ -687,7 +687,7 @@ comm_select(int msec) } while (timeout > current_dtime) ; - debugs(5, 8, "comm_select: time out: " << (int) squid_curtime); + debugs(5, 8, "comm_select: time out: " << squid_curtime); return COMM_TIMEOUT; } diff --git a/src/comm_select_win32.cc b/src/comm_select_win32.cc index 441429ae94..e925b874fc 100644 --- a/src/comm_select_win32.cc +++ b/src/comm_select_win32.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select_win32.cc,v 1.3 2007/04/28 22:26:37 hno Exp $ + * $Id: comm_select_win32.cc,v 1.4 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 5 Socket Functions * @@ -713,7 +713,7 @@ comm_select(int msec) } while (timeout > current_dtime) ; - debugs(5, 8, "comm_select: time out: " << (int) squid_curtime); + debugs(5, 8, "comm_select: time out: " << squid_curtime); return COMM_TIMEOUT; } diff --git a/src/disk.cc b/src/disk.cc index 32a27b431f..69897e1a46 100644 --- a/src/disk.cc +++ b/src/disk.cc @@ -1,6 +1,6 @@ /* - * $Id: disk.cc,v 1.172 2007/04/28 22:26:37 hno Exp $ + * $Id: disk.cc,v 1.173 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 6 Disk I/O Routines * AUTHOR: Harvest Derived @@ -241,7 +241,7 @@ diskHandleWrite(int fd, void *notused) assert(fdd->write_q->len > fdd->write_q->buf_offset); - debugs(6, 3, "diskHandleWrite: FD " << fd << " writing " << (int) (fdd->write_q->len - fdd->write_q->buf_offset) << " bytes"); + debugs(6, 3, "diskHandleWrite: FD " << fd << " writing " << (fdd->write_q->len - fdd->write_q->buf_offset) << " bytes"); errno = 0; @@ -444,7 +444,7 @@ diskHandleRead(int fd, void *data) PROF_start(diskHandleRead); if (F->disk.offset != ctrl_dat->offset) { - debugs(6, 3, "diskHandleRead: FD " << fd << " seeking to offset " << (int) ctrl_dat->offset); + debugs(6, 3, "diskHandleRead: FD " << fd << " seeking to offset " << ctrl_dat->offset); lseek(fd, ctrl_dat->offset, SEEK_SET); /* XXX ignore return? */ statCounter.syscalls.disk.seeks++; F->disk.offset = ctrl_dat->offset; diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 4d01c272a2..2090671fa4 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.97 2007/04/28 22:26:37 hno Exp $ + * $Id: dns_internal.cc,v 1.98 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -1026,7 +1026,7 @@ idnsRead(int fd, void *data) fd_bytes(DnsSocket, len, FD_READ); assert(N); (*N)++; - debugs(78, 3, "idnsRead: FD " << fd << ": received " << (int) len << " bytes from " << inet_ntoa(from.sin_addr) << "."); + debugs(78, 3, "idnsRead: FD " << fd << ": received " << len << " bytes from " << inet_ntoa(from.sin_addr) << "."); ns = idnsFromKnownNameserver(&from); if (ns >= 0) { @@ -1076,7 +1076,7 @@ idnsCheckQueue(void *unused) if (tvSubDsec(q->start_t, current_time) < Config.Timeout.idns_query) { idnsSendQuery(q); } else { - debugs(78, 2, "idnsCheckQueue: ID " << std::hex << (int) q->id << + debugs(78, 2, "idnsCheckQueue: ID " << std::hex << q->id << ": giving up after " << std::dec << q->nsends << " tries and " << std::setw(5)<< std::setprecision(2) << tvSubDsec(q->start_t, current_time) << " seconds"); @@ -1345,7 +1345,7 @@ idnsALookup(const char *name, IDNSCB * callback, void *data) return; } - debugs(78, 3, "idnsALookup: buf is " << (int) q->sz << " bytes for " << q->name << + debugs(78, 3, "idnsALookup: buf is " << q->sz << " bytes for " << q->name << ", id = 0x" << std::hex << q->id); q->callback = callback; @@ -1386,7 +1386,7 @@ idnsPTRLookup(const struct IN_ADDR addr, IDNSCB * callback, void *data) return; } - debugs(78, 3, "idnsPTRLookup: buf is " << (int) q->sz << " bytes for " << ip << + debugs(78, 3, "idnsPTRLookup: buf is " << q->sz << " bytes for " << ip << ", id = 0x" << std::hex << q->id); q->callback = callback; diff --git a/src/errorpage.cc b/src/errorpage.cc index 276e45ae02..571bed8cae 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.223 2007/04/28 22:26:37 hno Exp $ + * $Id: errorpage.cc,v 1.224 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -456,7 +456,7 @@ static void errorSendComplete(int fd, char *bufnotused, size_t size, comm_err_t errflag, int xerrno, void *data) { ErrorState *err = static_cast(data); - debugs(4, 3, "errorSendComplete: FD " << fd << ", size=" << (long int) size); + debugs(4, 3, "errorSendComplete: FD " << fd << ", size=" << size); if (errflag != COMM_ERR_CLOSING) { if (err->callback) { diff --git a/src/filemap.cc b/src/filemap.cc index d8c621ca7a..bb4a7ba2bf 100644 --- a/src/filemap.cc +++ b/src/filemap.cc @@ -1,6 +1,6 @@ /* - * $Id: filemap.cc,v 1.43 2007/04/28 22:26:37 hno Exp $ + * $Id: filemap.cc,v 1.44 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 8 Swap File Bitmap * AUTHOR: Harvest Derived @@ -62,7 +62,7 @@ file_map_create(void) fm->max_n_files = FM_INITIAL_NUMBER; fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT; debugs(8, 3, "file_map_create: creating space for " << fm->max_n_files << " files"); - debugs(8, 5, "--> " << fm->nwords << " words of " << (int) sizeof(*fm->file_map) << " bytes each"); + debugs(8, 5, "--> " << fm->nwords << " words of " << sizeof(*fm->file_map) << " bytes each"); fm->file_map = (unsigned long *)xcalloc(fm->nwords, sizeof(*fm->file_map)); /* XXX account fm->file_map */ return fm; diff --git a/src/forward.cc b/src/forward.cc index a80de6bec1..3975dfc5d0 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.162 2007/04/29 17:35:52 hno Exp $ + * $Id: forward.cc,v 1.163 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -499,7 +499,7 @@ FwdState::serverClosed(int fd) if (checkRetry()) { int originserver = (servers->_peer == NULL); - debugs(17, 3, "fwdServerClosed: re-forwarding (" << n_tries << " tries, " << (int) (squid_curtime - start_t) << " secs)"); + debugs(17, 3, "fwdServerClosed: re-forwarding (" << n_tries << " tries, " << (squid_curtime - start_t) << " secs)"); if (servers->next) { /* use next, or cycle if origin server isn't last */ @@ -1059,7 +1059,7 @@ FwdState::reforward() } s = e->getReply()->sline.status; - debugs(17, 3, "fwdReforward: status " << (int) s); + debugs(17, 3, "fwdReforward: status " << s); return reforwardableStatus(s); } diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index be33a07bd4..ef64bbfd64 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.72 2007/04/28 22:26:50 hno Exp $ + * $Id: store_dir_coss.cc,v 1.73 2007/04/30 16:56:16 wessels Exp $ * vim: set et : * * DEBUG: section 47 Store COSS Directory Routines @@ -230,7 +230,7 @@ CossSwapDir::writeCompleted(int errflag, size_t len, RefCount writ CossWrite* cossWrite= dynamic_cast(writeRequest.getRaw()); assert (cossWrite); - debugs(79, 3, "storeCossWriteMemBufDone: buf " << cossWrite->membuf << ", len " << (long int) len); + debugs(79, 3, "storeCossWriteMemBufDone: buf " << cossWrite->membuf << ", len " << len); if (errflag) { diff --git a/src/fs/coss/store_io_coss.cc b/src/fs/coss/store_io_coss.cc index ab227f6a8c..ec9455b64a 100644 --- a/src/fs/coss/store_io_coss.cc +++ b/src/fs/coss/store_io_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_io_coss.cc,v 1.31 2007/04/28 22:26:51 hno Exp $ + * $Id: store_io_coss.cc,v 1.32 2007/04/30 16:56:16 wessels Exp $ * * DEBUG: section 79 Storage Manager COSS Interface * AUTHOR: Eric Stern @@ -108,7 +108,7 @@ CossSwapDir::allocate(const StoreEntry * e, int which) current_membuf->flags.full = 1; current_offset = current_membuf->diskend; current_membuf->maybeWrite(this); - debugs(79, 2, "CossSwapDir::allocate: New offset - " << (long int) current_offset); + debugs(79, 2, "CossSwapDir::allocate: New offset - " << current_offset); newmb = createMemBuf(current_offset, checkf, &coll); current_membuf = newmb; } @@ -297,7 +297,7 @@ CossState::read_(char *buf, size_t size, off_t offset, STRCB * callback, void *c assert(read.callback_data == NULL); read.callback = callback; read.callback_data = cbdataReference(callback_data); - debugs(79, 3, "storeCossRead: offset " << (long int) offset); + debugs(79, 3, "storeCossRead: offset " << offset); offset_ = offset; flags.reading = 1; @@ -339,7 +339,7 @@ CossState::write(char const *buf, size_t size, off_t offset, FREE * free_func) assert(e->mem_obj->object_sz != -1); StoreFScoss::GetInstance().stats.write.ops++; - debugs(79, 3, "storeCossWrite: offset " << (long int) offset_ << ", len " << (unsigned long int) size); + debugs(79, 3, "storeCossWrite: offset " << offset_ << ", len " << (unsigned long int) size); diskoffset = SD->storeCossFilenoToDiskOffset(swap_filen) + offset_; CossSwapDir *SD = (CossSwapDir *)INDEXSD(swap_dirn); dest = SD->storeCossMemPointerFromDiskOffset(diskoffset, &membuf); @@ -532,7 +532,7 @@ void CossMemBuf::write(CossSwapDir * SD) { StoreFScoss::GetInstance().stats.stripe_write.ops++; - debugs(79, 3, "CossMemBuf::write: offset " << (long int) diskstart << ", len " << (long int) (diskend - diskstart)); + debugs(79, 3, "CossMemBuf::write: offset " << diskstart << ", len " << (diskend - diskstart)); flags.writing = 1; /* XXX Remember that diskstart/diskend are block offsets! */ SD->theFile->write(new CossWrite(WriteRequest((char const *)&buffer, diskstart, diskend - diskstart, NULL), this)); @@ -550,7 +550,7 @@ CossSwapDir::createMemBuf(size_t start, sfileno curfn, int *collision) CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL); newmb = cbdataAlloc(CossMemBuf); newmb->diskstart = start; - debugs(79, 3, "CossSwapDir::createMemBuf: creating new membuf at " << (long int) newmb->diskstart); + debugs(79, 3, "CossSwapDir::createMemBuf: creating new membuf at " << newmb->diskstart); debugs(79, 3, "CossSwapDir::createMemBuf: at " << newmb); newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ; newmb->flags.full = 0; diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 9691bed309..f0738b9d64 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.81 2007/04/28 22:26:51 hno Exp $ + * $Id: store_dir_ufs.cc,v 1.82 2007/04/30 16:56:17 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -295,7 +295,7 @@ UFSSwapDir::doubleCheck(StoreEntry & e) if ((off_t)e.swap_file_sz != sb.st_size) { debugs(47, 0, "UFSSwapDir::doubleCheck: SIZE MISMATCH"); - debugs(47, 0, "UFSSwapDir::doubleCheck: ENTRY SIZE: " << (long int) e.swap_file_sz << ", FILE SIZE: " << (long int) sb.st_size); + debugs(47, 0, "UFSSwapDir::doubleCheck: ENTRY SIZE: " << e.swap_file_sz << ", FILE SIZE: " << sb.st_size); dumpEntry(e); return true; } diff --git a/src/fs/ufs/store_io_ufs.cc b/src/fs/ufs/store_io_ufs.cc index fa395e2a2f..11a5b9a0ad 100644 --- a/src/fs/ufs/store_io_ufs.cc +++ b/src/fs/ufs/store_io_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_io_ufs.cc,v 1.37 2007/04/28 22:26:51 hno Exp $ + * $Id: store_io_ufs.cc,v 1.38 2007/04/30 16:56:17 wessels Exp $ * * DEBUG: section 79 Storage Manager UFS Interface * AUTHOR: Duane Wessels @@ -453,7 +453,7 @@ UFSStoreState::kickReadQueue() if (NULL == q) return false; - debugs(79, 3, "UFSStoreState::kickReadQueue: reading queued request of " << (long int) q->size << " bytes"); + debugs(79, 3, "UFSStoreState::kickReadQueue: reading queued request of " << q->size << " bytes"); void *cbdata; diff --git a/src/ftp.cc b/src/ftp.cc index f8b32ca42b..6305f567ec 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.418 2007/04/28 22:26:37 hno Exp $ + * $Id: ftp.cc,v 1.419 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1123,7 +1123,7 @@ FtpStateData::parseListing() usable = end - sbuf; - debugs(9, 3, "ftpParseListing: usable = " << (int) usable); + debugs(9, 3, "ftpParseListing: usable = " << usable); if (usable == 0) { debugs(9, 3, "ftpParseListing: didn't find end for " << e->url() ); @@ -1601,7 +1601,7 @@ FtpStateData::ftpWriteCommandCallback(int fd, char *buf, size_t size, comm_err_t { FtpStateData *ftpState = (FtpStateData *)data; - debugs(9, 7, "ftpWriteCommandCallback: wrote " << (int) size << " bytes"); + debugs(9, 7, "ftpWriteCommandCallback: wrote " << size << " bytes"); if (size > 0) { fd_bytes(fd, size, FD_WRITE); @@ -1655,7 +1655,7 @@ FtpStateData::ftpParseControlReply(char *buf, size_t len, int *codep, int *used) return NULL; } - debugs(9, 3, "ftpParseControlReply: " << (int) len << " bytes to play with"); + debugs(9, 3, "ftpParseControlReply: " << len << " bytes to play with"); end++; s = sbuf; s += strspn(s, crlf); @@ -1742,7 +1742,7 @@ FtpStateData::ftpReadControlReply(int fd, char *buf, size_t len, comm_err_t errf { FtpStateData *ftpState = (FtpStateData *)data; StoreEntry *entry = ftpState->entry; - debugs(9, 5, "ftpReadControlReply: FD " << fd << ", Read " << (int)len << " bytes"); + debugs(9, 5, "ftpReadControlReply: FD " << fd << ", Read " << len << " bytes"); if (len > 0) { kb_incr(&statCounter.server.all.kbytes_in, len); diff --git a/src/gopher.cc b/src/gopher.cc index 3848ebdaa7..8fc99f290f 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,6 +1,6 @@ /* - * $Id: gopher.cc,v 1.203 2007/04/28 22:26:37 hno Exp $ + * $Id: gopher.cc,v 1.204 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -758,7 +758,7 @@ gopherReadReply(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void kb_incr(&statCounter.server.other.kbytes_in, len); } - debugs(10, 5, "gopherReadReply: FD " << fd << " read len=" << (int)len); + debugs(10, 5, "gopherReadReply: FD " << fd << " read len=" << len); if (flag == COMM_OK && len > 0) { commSetTimeout(fd, Config.Timeout.read, NULL, NULL); @@ -826,7 +826,7 @@ gopherSendComplete(int fd, char *buf, size_t size, comm_err_t errflag, int xerrn { GopherStateData *gopherState = (GopherStateData *) data; StoreEntry *entry = gopherState->entry; - debugs(10, 5, "gopherSendComplete: FD " << fd << " size: " << (int) size << " errflag: " << errflag); + debugs(10, 5, "gopherSendComplete: FD " << fd << " size: " << size << " errflag: " << errflag); if (size > 0) { fd_bytes(fd, size, FD_WRITE); diff --git a/src/helper.cc b/src/helper.cc index 3d3adefb60..beb2ffb5a0 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -1,6 +1,6 @@ /* - * $Id: helper.cc,v 1.80 2007/04/28 22:26:37 hno Exp $ + * $Id: helper.cc,v 1.81 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -971,7 +971,7 @@ helperHandleRead(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, voi return; } - debugs(84, 5, "helperHandleRead: " << (int)len << " bytes from " << hlp->id_name << " #" << srv->index + 1 << "."); + debugs(84, 5, "helperHandleRead: " << len << " bytes from " << hlp->id_name << " #" << srv->index + 1 << "."); if (flag != COMM_OK || len <= 0) { if (len < 0) @@ -1080,7 +1080,7 @@ helperStatefulHandleRead(int fd, char *buf, size_t len, comm_err_t flag, int xer return; } - debugs(84, 5, "helperStatefulHandleRead: " << (int)len << " bytes from " << + debugs(84, 5, "helperStatefulHandleRead: " << len << " bytes from " << hlp->id_name << " #" << srv->index + 1 << "."); @@ -1476,7 +1476,7 @@ helperDispatch(helper_server * srv, helper_request * r) srv, NULL); /* Handler-data, free func */ } - debugs(84, 5, "helperDispatch: Request sent to " << hlp->id_name << " #" << srv->index + 1 << ", " << (int) strlen(r->buf) << " bytes"); + debugs(84, 5, "helperDispatch: Request sent to " << hlp->id_name << " #" << srv->index + 1 << ", " << strlen(r->buf) << " bytes"); srv->stats.uses++; hlp->stats.requests++; diff --git a/src/htcp.cc b/src/htcp.cc index 44624b1f4a..7f5e8c9dc8 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -1,6 +1,6 @@ /* - * $Id: htcp.cc,v 1.75 2007/04/28 22:26:37 hno Exp $ + * $Id: htcp.cc,v 1.76 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 31 Hypertext Caching Protocol * AUTHOR: Duane Wesssels @@ -415,7 +415,7 @@ htcpBuildSpecifier(char *buf, size_t buflen, htcpStuff * stuff) off += s; - debugs(31, 3, "htcpBuildSpecifier: size " << (int) off); + debugs(31, 3, "htcpBuildSpecifier: size " << off); return off; } @@ -518,7 +518,7 @@ htcpBuildData(char *buf, size_t buflen, htcpStuff * stuff) off += op_data_sz; - debugs(31, 3, "htcpBuildData: hdr.length = " << (int) off); + debugs(31, 3, "htcpBuildData: hdr.length = " << off); hdr.length = (u_int16_t) off; @@ -550,7 +550,7 @@ htcpBuildData(char *buf, size_t buflen, htcpStuff * stuff) xmemcpy(buf, &hdrSquid, hdr_sz); } - debugs(31, 3, "htcpBuildData: size " << (int) off); + debugs(31, 3, "htcpBuildData: size " << off); return off; } @@ -597,7 +597,7 @@ htcpBuildPacket(char *buf, size_t buflen, htcpStuff * stuff) xmemcpy(buf, &hdr, hdr_sz); - debugs(31, 3, "htcpBuildPacket: size " << (int) off); + debugs(31, 3, "htcpBuildPacket: size " << off); return off; } @@ -1107,7 +1107,7 @@ static void htcpHandleTst(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from) { - debugs(31, 3, "htcpHandleTst: sz = " << (int) sz); + debugs(31, 3, "htcpHandleTst: sz = " << sz); if (hdr->RR == RR_REQUEST) htcpHandleTstRequest(hdr, buf, sz, from); @@ -1163,7 +1163,7 @@ htcpHandleTstResponse(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_i } htcpReply.msg_id = hdr->msg_id; - debugs(31, 3, "htcpHandleTstResponse: msg_id = " << (int) htcpReply.msg_id); + debugs(31, 3, "htcpHandleTstResponse: msg_id = " << htcpReply.msg_id); htcpReply.hit = hdr->response ? 0 : 1; if (hdr->F1) @@ -1360,19 +1360,19 @@ htcpHandleData(char *buf, int sz, struct sockaddr_in *from) hdr.length = ntohs(hdr.length); hdr.msg_id = ntohl(hdr.msg_id); debugs(31, 3, "htcpHandleData: sz = " << sz); - debugs(31, 3, "htcpHandleData: length = " << (int) hdr.length); + debugs(31, 3, "htcpHandleData: length = " << hdr.length); if (hdr.opcode >= HTCP_END) { - debugs(31, 1, "htcpHandleData: client " << inet_ntoa(from->sin_addr) << ", opcode " << (int) hdr.opcode << " out of range"); + debugs(31, 1, "htcpHandleData: client " << inet_ntoa(from->sin_addr) << ", opcode " << hdr.opcode << " out of range"); return; } - debugs(31, 3, "htcpHandleData: opcode = " << (int) hdr.opcode << " " << htcpOpcodeStr[hdr.opcode]); - debugs(31, 3, "htcpHandleData: response = " << (int) hdr.response); - debugs(31, 3, "htcpHandleData: F1 = " << (int) hdr.F1); - debugs(31, 3, "htcpHandleData: RR = " << (int) hdr.RR); - debugs(31, 3, "htcpHandleData: msg_id = " << (int) hdr.msg_id); + debugs(31, 3, "htcpHandleData: opcode = " << hdr.opcode << " " << htcpOpcodeStr[hdr.opcode]); + debugs(31, 3, "htcpHandleData: response = " << hdr.response); + debugs(31, 3, "htcpHandleData: F1 = " << hdr.F1); + debugs(31, 3, "htcpHandleData: RR = " << hdr.RR); + debugs(31, 3, "htcpHandleData: msg_id = " << hdr.msg_id); if (sz < hdr.length) { @@ -1444,9 +1444,9 @@ htcpHandle(char *buf, int sz, struct sockaddr_in *from) else old_squid_format = 0; - debugs(31, 3, "htcpHandle: htcpHdr.length = " << (int) htcpHdr.length); - debugs(31, 3, "htcpHandle: htcpHdr.major = " << (int) htcpHdr.major); - debugs(31, 3, "htcpHandle: htcpHdr.minor = " << (int) htcpHdr.minor); + debugs(31, 3, "htcpHandle: htcpHdr.length = " << htcpHdr.length); + debugs(31, 3, "htcpHandle: htcpHdr.major = " << htcpHdr.major); + debugs(31, 3, "htcpHandle: htcpHdr.minor = " << htcpHdr.minor); if (sz != htcpHdr.length) { @@ -1524,7 +1524,7 @@ htcpInit(void) commSetSelect(htcpInSocket, COMM_SELECT_READ, htcpRecv, NULL, 0); - debugs(31, 1, "Accepting HTCP messages on port " << (int) Config.Port.htcp << ", FD " << htcpInSocket << "."); + debugs(31, 1, "Accepting HTCP messages on port " << Config.Port.htcp << ", FD " << htcpInSocket << "."); if (Config.Addrs.udp_outgoing.s_addr != no_addr.s_addr) { enter_suid(); @@ -1541,7 +1541,7 @@ htcpInit(void) commSetSelect(htcpOutSocket, COMM_SELECT_READ, htcpRecv, NULL, 0); - debugs(31, 1, "Outgoing HTCP messages on port " << (int) Config.Port.htcp << ", FD " << htcpOutSocket << "."); + debugs(31, 1, "Outgoing HTCP messages on port " << Config.Port.htcp << ", FD " << htcpOutSocket << "."); fd_note(htcpInSocket, "Incoming HTCP socket"); } else { diff --git a/src/http.cc b/src/http.cc index d2e5e54493..c870511496 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.517 2007/04/28 22:26:37 hno Exp $ + * $Id: http.cc,v 1.518 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -980,7 +980,7 @@ HttpStateData::readReply (size_t len, comm_err_t flag, int xerrno) errno = 0; /* prepare the read size for the next read (if any) */ - debugs(11, 5, "httpReadReply: FD " << fd << ": len " << (int)len << "."); + debugs(11, 5, "httpReadReply: FD " << fd << ": len " << len << "."); if (flag == COMM_OK && len > 0) { readBuf->appended(len); @@ -1285,7 +1285,7 @@ void HttpStateData::SendComplete(int fd, char *bufnotused, size_t size, comm_err_t errflag, int xerrno, void *data) { HttpStateData *httpState = static_cast(data); - debugs(11, 5, "httpSendComplete: FD " << fd << ": size " << (int) size << ": errflag " << errflag << "."); + debugs(11, 5, "httpSendComplete: FD " << fd << ": size " << size << ": errflag " << errflag << "."); #if URL_CHECKSUM_DEBUG entry->mem_obj->checkUrlChecksum(); diff --git a/src/icmp.cc b/src/icmp.cc index b17eb56db7..51d4d797a5 100644 --- a/src/icmp.cc +++ b/src/icmp.cc @@ -1,6 +1,6 @@ /* - * $Id: icmp.cc,v 1.92 2007/04/29 17:35:52 hno Exp $ + * $Id: icmp.cc,v 1.93 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 37 ICMP Routines * AUTHOR: Duane Wessels @@ -135,7 +135,7 @@ icmpRecv(int unused1, void *unused2) break; default: - debugs(37, 1, "icmpRecv: Bad opcode: " << (int) preply.opcode); + debugs(37, 1, "icmpRecv: Bad opcode: " << preply.opcode); break; } } @@ -268,7 +268,7 @@ icmpOpen(void) #ifdef _SQUID_MSWIN_ - debugs(37, 4, "Pinger handle: 0x" << std::hex << (unsigned)hIpc << std::dec << ", PID: " << pid); + debugs(37, 4, "Pinger handle: 0x" << std::hex << hIpc << std::dec << ", PID: " << pid); #endif #endif @@ -297,7 +297,7 @@ icmpClose(void) if (hIpc) { if (WaitForSingleObject(hIpc, 12000) != WAIT_OBJECT_0) { getCurrentTime(); - debugs(37, 1, "icmpClose: WARNING: (pinger," << (long int)pid << ") didn't exit in 12 seconds"); + debugs(37, 1, "icmpClose: WARNING: (pinger," << pid << ") didn't exit in 12 seconds"); } CloseHandle(hIpc); diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 72f04afa39..f94945b8e8 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -1,6 +1,6 @@ /* - * $Id: icp_v2.cc,v 1.98 2007/04/28 22:26:37 hno Exp $ + * $Id: icp_v2.cc,v 1.99 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -572,9 +572,9 @@ icpPktDump(icp_common_t * pkt) struct IN_ADDR a; - debugs(12, 9, "opcode: " << std::setw(3) << (int) pkt->opcode << " " << icp_opcode_str[pkt->opcode]); - debugs(12, 9, "version: "<< std::left << std::setw(8) << (int) pkt->version); - debugs(12, 9, "length: "<< std::left << std::setw(8) << (int) ntohs(pkt->length)); + debugs(12, 9, "opcode: " << std::setw(3) << pkt->opcode << " " << icp_opcode_str[pkt->opcode]); + debugs(12, 9, "version: "<< std::left << std::setw(8) << pkt->version); + debugs(12, 9, "length: "<< std::left << std::setw(8) << ntohs(pkt->length)); debugs(12, 9, "reqnum: "<< std::left << std::setw(8) << ntohl(pkt->reqnum)); debugs(12, 9, "flags: "<< std::left << std::hex << std::setw(8) << ntohl(pkt->flags)); a.s_addr = pkt->shostid; @@ -719,7 +719,7 @@ icpConnectionsOpen(void) NULL, 0); - debugs(12, 1, "Outgoing ICP messages on port " << (int) port << ", FD " << theOutIcpConnection << "."); + debugs(12, 1, "Outgoing ICP messages on port " << port << ", FD " << theOutIcpConnection << "."); fd_note(theOutIcpConnection, "Outgoing ICP socket"); diff --git a/src/ipc_win32.cc b/src/ipc_win32.cc index 6e7f0c4ef9..905f4f8327 100755 --- a/src/ipc_win32.cc +++ b/src/ipc_win32.cc @@ -1,6 +1,6 @@ /* - * $Id: ipc_win32.cc,v 1.3 2007/04/28 22:26:37 hno Exp $ + * $Id: ipc_win32.cc,v 1.4 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 54 Windows Interprocess Communication * AUTHOR: Andrey Shorin @@ -699,7 +699,7 @@ ipc_thread_1(void *in_params) if (-1 == ipcSend(cwfd, buf1, strlen(buf1))) goto cleanup; - debugs(54, 2, "ipc(" << prog << "," << (long int) pid << "): started successfully"); + debugs(54, 2, "ipc(" << prog << "," << pid << "): started successfully"); /* cycle */ for (;;) { diff --git a/src/main.cc b/src/main.cc index ac90e48f19..20788cb091 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.446 2007/04/28 22:26:37 hno Exp $ + * $Id: main.cc,v 1.447 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -175,7 +175,7 @@ SignalDispatcher::dispatch() } else if (do_shutdown) { time_t wait = do_shutdown > 0 ? (int) Config.shutdownLifetime : 0; debugs(1, 1, "Preparing for shutdown after " << statCounter.client_http.requests << " requests"); - debugs(1, 1, "Waiting " << (int) wait << " seconds for active connections to finish"); + debugs(1, 1, "Waiting " << wait << " seconds for active connections to finish"); do_shutdown = 0; shutting_down = 1; #if USE_WIN32_SERVICE diff --git a/src/neighbors.cc b/src/neighbors.cc index db004b36ed..399abc204b 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.348 2007/04/28 22:26:37 hno Exp $ + * $Id: neighbors.cc,v 1.349 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -376,7 +376,7 @@ getWeightedRoundRobinParent(HttpRequest * request) q->rr_count += weighted_rtt; - debugs(15, 3, "getWeightedRoundRobinParent: weighted_rtt " << (int) weighted_rtt); + debugs(15, 3, "getWeightedRoundRobinParent: weighted_rtt " << weighted_rtt); } debugs(15, 3, "getWeightedRoundRobinParent: returning " << (q ? q->host : "NULL")); @@ -1039,7 +1039,7 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const struct socka char *opcode_d; icp_opcode opcode = (icp_opcode) header->opcode; - debugs(15, 6, "neighborsUdpAck: opcode " << (int) opcode << " '" << storeKeyText(key) << "'"); + debugs(15, 6, "neighborsUdpAck: opcode " << opcode << " '" << storeKeyText(key) << "'"); if (NULL != (entry = Store::Root().get(key))) mem = entry->mem_obj; diff --git a/src/net_db.cc b/src/net_db.cc index 97a15b8b03..2ad478ebd7 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -1,6 +1,6 @@ /* - * $Id: net_db.cc,v 1.193 2007/04/28 22:26:37 hno Exp $ + * $Id: net_db.cc,v 1.194 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels @@ -695,7 +695,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer recievedData) rec_sz += 1 + sizeof(addr.s_addr); rec_sz += 1 + sizeof(int); rec_sz += 1 + sizeof(int); - debugs(38, 3, "netdbExchangeHandleReply: " << (int) recievedData.length << " read bytes"); + debugs(38, 3, "netdbExchangeHandleReply: " << recievedData.length << " read bytes"); if (!cbdataReferenceValid(ex->p)) { debugs(38, 3, "netdbExchangeHandleReply: Peer became invalid"); @@ -849,7 +849,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer recievedData) " entries, (x " << rec_sz << " bytes) == " << nused * rec_sz << " bytes total"); - debugs(38, 3, "netdbExchangeHandleReply: used " << (long int) ex->used); + debugs(38, 3, "netdbExchangeHandleReply: used " << ex->used); if (EBIT_TEST(ex->e->flags, ENTRY_ABORTED)) { debugs(38, 3, "netdbExchangeHandleReply: ENTRY_ABORTED"); diff --git a/src/pconn.cc b/src/pconn.cc index 37f0b4716e..6de905be67 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -1,6 +1,6 @@ /* - * $Id: pconn.cc,v 1.49 2007/04/28 22:26:37 hno Exp $ + * $Id: pconn.cc,v 1.50 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels @@ -151,7 +151,7 @@ IdleConnList::findUseableFD() void IdleConnList::read(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data) { - debugs(48, 3, "IdleConnList::read: " << (int) len << " bytes from FD " << fd); + debugs(48, 3, "IdleConnList::read: " << len << " bytes from FD " << fd); if (flag == COMM_ERR_CLOSING) { /* Bail out early on COMM_ERR_CLOSING - close handlers will tidy up for us */ diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 52c6ae6a45..6bf642686d 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.cc,v 1.122 2007/04/28 22:26:37 hno Exp $ + * $Id: peer_digest.cc,v 1.123 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -231,7 +231,7 @@ peerDigestSetCheck(PeerDigest * pd, time_t delay) { eventAdd("peerDigestCheck", peerDigestCheck, pd, (double) delay, 1); pd->times.next_check = squid_curtime + delay; - debugs(72, 3, "peerDigestSetCheck: will check peer " << pd->host.buf() << " in " << (int) delay << " secs"); + debugs(72, 3, "peerDigestSetCheck: will check peer " << pd->host.buf() << " in " << delay << " secs"); } /* @@ -268,7 +268,7 @@ peerDigestCheck(void *data) } debugs(72, 3, "peerDigestCheck: peer " << pd->peer->host << ":" << pd->peer->http_port); - debugs(72, 3, "peerDigestCheck: time: " << (long int) squid_curtime << + debugs(72, 3, "peerDigestCheck: time: " << squid_curtime << ", last received: " << (long int) pd->times.received << " (" << std::showpos << (int) (squid_curtime - pd->times.received) << ")"); diff --git a/src/peer_select.cc b/src/peer_select.cc index 84bf37dfba..6ffd0e2173 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.146 2007/04/28 22:26:37 hno Exp $ + * $Id: peer_select.cc,v 1.147 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -762,7 +762,7 @@ peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *pingdata, voi #endif else - debugs(44, 1, "peerHandlePingReply: unknown protocol_t " << (int) proto); + debugs(44, 1, "peerHandlePingReply: unknown protocol_t " << proto); } static void diff --git a/src/pinger.cc b/src/pinger.cc index 369ffaa91a..f906f3fd83 100644 --- a/src/pinger.cc +++ b/src/pinger.cc @@ -1,6 +1,6 @@ /* - * $Id: pinger.cc,v 1.58 2007/04/28 22:26:37 hno Exp $ + * $Id: pinger.cc,v 1.59 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 42 ICMP Pinger program * AUTHOR: Duane Wessels @@ -523,10 +523,10 @@ static void pingerLog(struct icmphdr *icmp, struct IN_ADDR addr, int rtt, int hops) { - debugs(42, 2, "pingerLog: " << std::setw(9) << (int) current_time.tv_sec << + debugs(42, 2, "pingerLog: " << std::setw(9) << current_time.tv_sec << "."<< std::setfill('0') << std::setw(6) << - (int) current_time.tv_usec << " "<< std::left << std::setfill(' ')<< - std::setw(16) << inet_ntoa(addr) << " "<< (int) icmp->icmp_type << + current_time.tv_usec << " "<< std::left << std::setfill(' ')<< + std::setw(16) << inet_ntoa(addr) << " "<< icmp->icmp_type << " " << std::setw(15) << icmpPktStr[icmp->icmp_type] << " " << rtt << "ms " << hops << " hops"); } diff --git a/src/refresh.cc b/src/refresh.cc index 9d4a1fedcb..8f3b8f75d7 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -1,6 +1,6 @@ /* - * $Id: refresh.cc,v 1.74 2007/04/28 22:26:37 hno Exp $ + * $Id: refresh.cc,v 1.75 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 22 Refresh Calculation * AUTHOR: Harvest Derived @@ -168,13 +168,13 @@ refreshStaleness(const StoreEntry * entry, time_t check_time, time_t age, const sf->expires = true; if (entry->expires > check_time) { - debugs(22, 3, "FRESH: expires " << (int) entry->expires << - " >= check_time " << (int) check_time << " "); + debugs(22, 3, "FRESH: expires " << entry->expires << + " >= check_time " << check_time << " "); return -1; } else { - debugs(22, 3, "STALE: expires " << (int) entry->expires << - " < check_time " << (int) check_time << " "); + debugs(22, 3, "STALE: expires " << entry->expires << + " < check_time " << check_time << " "); return (check_time - entry->expires); } @@ -187,7 +187,7 @@ refreshStaleness(const StoreEntry * entry, time_t check_time, time_t age, const */ if (age > R->max) { - debugs(22, 3, "STALE: age " << (int) age << " > max " << (int) R->max << " "); + debugs(22, 3, "STALE: age " << age << " > max " << R->max << " "); sf->max = true; return (age - R->max); } @@ -204,10 +204,10 @@ refreshStaleness(const StoreEntry * entry, time_t check_time, time_t age, const sf->lmfactor = true; if (age >= stale_age) { - debugs(22, 3, "STALE: age " << (int) age << " > stale_age " << (int) stale_age); + debugs(22, 3, "STALE: age " << age << " > stale_age " << stale_age); return (age - stale_age); } else { - debugs(22, 3, "FRESH: age " << (int) age << " <= stale_age " << (int) stale_age); + debugs(22, 3, "FRESH: age " << age << " <= stale_age " << stale_age); return -1; } } @@ -217,12 +217,12 @@ refreshStaleness(const StoreEntry * entry, time_t check_time, time_t age, const * configured minimum age. */ if (age <= R->min) { - debugs(22, 3, "FRESH: age " << (int) age << " <= min " << (int) R->min); + debugs(22, 3, "FRESH: age " << age << " <= min " << R->min); sf->min = true; return -1; } - debugs(22, 3, "STALE: age " << (int) age << " > min " << (int) R->min); + debugs(22, 3, "STALE: age " << age << " > min " << R->min); return (age - R->min); } @@ -267,7 +267,7 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta) (int) R->max << "'"); - debugs(22, 3, "refreshCheck: age = " << (int) age); + debugs(22, 3, "refreshCheck: age = " << age); debugs(22, 3, "\tcheck_time:\t" << mkrfc1123(check_time)); diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc index 260c3e6f44..596dd10938 100644 --- a/src/repl/heap/store_repl_heap.cc +++ b/src/repl/heap/store_repl_heap.cc @@ -1,6 +1,6 @@ /* - * $Id: store_repl_heap.cc,v 1.24 2007/04/28 22:26:51 hno Exp $ + * $Id: store_repl_heap.cc,v 1.25 2007/04/30 16:56:19 wessels Exp $ * * DEBUG: section 81 Store HEAP Removal Policies * AUTHOR: Henrik Nordstrom @@ -260,7 +260,7 @@ heap_purgeDone(RemovalPurgeWalker * walker) if (heap_walker->min_age > 0) { heap->theHeap->age = heap_walker->min_age; - debugs(81, 3, "heap_purgeDone: Heap age set to " << (double) heap->theHeap->age ); + debugs(81, 3, "heap_purgeDone: Heap age set to " << heap->theHeap->age ); } /* diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 70092771fd..65387fd93c 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.cc,v 1.77 2007/04/28 22:26:37 hno Exp $ + * $Id: snmp_core.cc,v 1.78 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -381,7 +381,7 @@ snmpConnectionOpen(void) commSetSelect(theInSnmpConnection, COMM_SELECT_READ, snmpHandleUdp, NULL, 0); - debugs(1, 1, "Accepting SNMP messages on port " << (int) port << ", FD " << theInSnmpConnection << "."); + debugs(1, 1, "Accepting SNMP messages on port " << port << ", FD " << theInSnmpConnection << "."); if (Config.Addrs.snmp_outgoing.s_addr != no_addr.s_addr) { enter_suid(); @@ -401,7 +401,7 @@ snmpConnectionOpen(void) snmpHandleUdp, NULL, 0); - debugs(1, 1, "Outgoing SNMP messages on port " << (int) port << ", FD " << theOutSnmpConnection << "."); + debugs(1, 1, "Outgoing SNMP messages on port " << port << ", FD " << theOutSnmpConnection << "."); fd_note(theOutSnmpConnection, "Outgoing SNMP socket"); diff --git a/src/store.cc b/src/store.cc index 9c11c4c012..eecec7da32 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.610 2007/04/28 22:26:37 hno Exp $ + * $Id: store.cc,v 1.611 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -1562,20 +1562,20 @@ StoreEntry::dump(int l) const debugs(20, l, "StoreEntry->key: " << getMD5Text()); debugs(20, l, "StoreEntry->next: " << next); debugs(20, l, "StoreEntry->mem_obj: " << mem_obj); - debugs(20, l, "StoreEntry->timestamp: " << (int) timestamp); - debugs(20, l, "StoreEntry->lastref: " << (int) lastref); - debugs(20, l, "StoreEntry->expires: " << (int) expires); - debugs(20, l, "StoreEntry->lastmod: " << (int) lastmod); - debugs(20, l, "StoreEntry->swap_file_sz: " << (int) swap_file_sz); + debugs(20, l, "StoreEntry->timestamp: " << timestamp); + debugs(20, l, "StoreEntry->lastref: " << lastref); + debugs(20, l, "StoreEntry->expires: " << expires); + debugs(20, l, "StoreEntry->lastmod: " << lastmod); + debugs(20, l, "StoreEntry->swap_file_sz: " << swap_file_sz); debugs(20, l, "StoreEntry->refcount: " << refcount); debugs(20, l, "StoreEntry->flags: " << storeEntryFlags(this)); - debugs(20, l, "StoreEntry->swap_dirn: " << (int) swap_dirn); - debugs(20, l, "StoreEntry->swap_filen: " << (int) swap_filen); - debugs(20, l, "StoreEntry->lock_count: " << (int) lock_count); - debugs(20, l, "StoreEntry->mem_status: " << (int) mem_status); - debugs(20, l, "StoreEntry->ping_status: " << (int) ping_status); - debugs(20, l, "StoreEntry->store_status: " << (int) store_status); - debugs(20, l, "StoreEntry->swap_status: " << (int) swap_status); + debugs(20, l, "StoreEntry->swap_dirn: " << swap_dirn); + debugs(20, l, "StoreEntry->swap_filen: " << swap_filen); + debugs(20, l, "StoreEntry->lock_count: " << lock_count); + debugs(20, l, "StoreEntry->mem_status: " << mem_status); + debugs(20, l, "StoreEntry->ping_status: " << ping_status); + debugs(20, l, "StoreEntry->store_status: " << store_status); + debugs(20, l, "StoreEntry->swap_status: " << swap_status); } /* @@ -1864,7 +1864,7 @@ StoreEntry::modifiedSince(HttpRequest * request) const debugs(88, 3, "modifiedSince: '" << url() << "'"); - debugs(88, 3, "modifiedSince: mod_time = " << (long int) mod_time); + debugs(88, 3, "modifiedSince: mod_time = " << mod_time); if (mod_time < 0) return true; diff --git a/src/store_client.cc b/src/store_client.cc index 234f58d2f1..559848f5ba 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.156 2007/04/28 22:26:38 hno Exp $ + * $Id: store_client.cc,v 1.157 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 90 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -477,7 +477,7 @@ storeClientReadBody(void *data, const char *buf, ssize_t len, StoreIOState::Poin assert(sc->flags.disk_io_pending); sc->flags.disk_io_pending = 0; assert(sc->_callback.pending()); - debugs(90, 3, "storeClientReadBody: len " << (int) len << ""); + debugs(90, 3, "storeClientReadBody: len " << len << ""); if (sc->copyInto.offset == 0 && len > 0 && sc->entry->getReply()->sline.status == 0) { /* Our structure ! */ @@ -516,7 +516,7 @@ storeClientReadHeader(void *data, const char *buf, ssize_t len, StoreIOState::Po void store_client::unpackHeader(char const *buf, ssize_t len) { - debugs(90, 3, "store_client::unpackHeader: len " << (int) len << ""); + debugs(90, 3, "store_client::unpackHeader: len " << len << ""); if (len < 0) { debugs(90, 3, "store_client::unpackHeader: " << xstrerror() << ""); @@ -586,7 +586,7 @@ store_client::readHeader(char const *buf, ssize_t len) */ size_t copy_sz = XMIN(copyInto.length, body_sz) ; - debugs(90, 3, "storeClientReadHeader: copying " << (int) copy_sz << " bytes of body"); + debugs(90, 3, "storeClientReadHeader: copying " << copy_sz << " bytes of body"); xmemmove(copyInto.data, copyInto.data + mem->swap_hdr_sz, copy_sz); if (copyInto.offset == 0 && len > 0 && entry->getReply()->sline.status == 0) { diff --git a/src/store_digest.cc b/src/store_digest.cc index 6439d149aa..73054ca36c 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: store_digest.cc,v 1.74 2007/04/28 22:26:38 hno Exp $ + * $Id: store_digest.cc,v 1.75 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 71 Store Digest Manager * AUTHOR: Alex Rousskov @@ -255,7 +255,7 @@ storeDigestAddable(const StoreEntry * e) /* still here? check staleness */ /* Note: We should use the time of the next rebuild, not (cur_time+period) */ if (refreshCheckDigest(e, Config.digest.rebuild_period)) { - debugs(71, 6, "storeDigestAdd: entry expires within " << (int) Config.digest.rebuild_period << " secs, ignoring"); + debugs(71, 6, "storeDigestAdd: entry expires within " << Config.digest.rebuild_period << " secs, ignoring"); return 0; } @@ -425,7 +425,7 @@ storeDigestRewriteResume(void) rep->setHeaders(version, HTTP_OK, "Cache Digest OK", "application/cache-digest", store_digest->mask_size + sizeof(sd_state.cblock), squid_curtime, squid_curtime + Config.digest.rewrite_period); - debugs(71, 3, "storeDigestRewrite: entry expires on " << (long int) rep->expires << + debugs(71, 3, "storeDigestRewrite: entry expires on " << rep->expires << " (" << std::showpos << (int) (rep->expires - squid_curtime) << ")"); e->buffer(); e->replaceHttpReply(rep); @@ -441,7 +441,7 @@ storeDigestRewriteFinish(StoreEntry * e) assert(e == sd_state.rewrite_lock); e->complete(); e->timestampsSet(); - debugs(71, 2, "storeDigestRewriteFinish: digest expires at " << (long int) e->expires << + debugs(71, 2, "storeDigestRewriteFinish: digest expires at " << e->expires << " (" << std::showpos << (int) (e->expires - squid_curtime) << ")"); /* is this the write order? @?@ */ e->mem_obj->unlinkRequest(); diff --git a/src/store_io.cc b/src/store_io.cc index 21bbf8ff5e..64d30c2b0c 100644 --- a/src/store_io.cc +++ b/src/store_io.cc @@ -54,7 +54,7 @@ storeCreate(StoreEntry * e, StoreIOState::STFNCB * file_callback, StoreIOState:: return NULL; } - debugs(20, 2, "storeCreate: Selected dir '" << dirn << "' for obj size '" << (long int) objsize << "'"); + debugs(20, 2, "storeCreate: Selected dir '" << dirn << "' for obj size '" << objsize << "'"); SD = dynamic_cast(INDEXSD(dirn)); /* Now that we have a fs to use, call its storeCreate function */ diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 508b9e79a6..5d77441c4a 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.116 2007/04/28 22:26:38 hno Exp $ + * $Id: store_swapout.cc,v 1.117 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -147,11 +147,11 @@ doPages(StoreEntry *anEntry) */ ssize_t swap_buf_len = mem->swapout.memnode->nodeBuffer.length; - debugs(20, 3, "storeSwapOut: swap_buf_len = " << (int) swap_buf_len); + debugs(20, 3, "storeSwapOut: swap_buf_len = " << swap_buf_len); assert(swap_buf_len > 0); - debugs(20, 3, "storeSwapOut: swapping out " << (long int) swap_buf_len << " bytes from " << (long int) mem->swapout.queue_offset); + debugs(20, 3, "storeSwapOut: swapping out " << swap_buf_len << " bytes from " << mem->swapout.queue_offset); mem->swapout.queue_offset += swap_buf_len; @@ -189,12 +189,12 @@ StoreEntry::swapOut() if (!swapoutPossible()) return; - debugs(20, 7, "storeSwapOut: mem_obj->inmem_lo = " << (int) mem_obj->inmem_lo); - debugs(20, 7, "storeSwapOut: mem_obj->endOffset() = " << (int) mem_obj->endOffset()); - debugs(20, 7, "storeSwapOut: swapout.queue_offset = " << (int) mem_obj->swapout.queue_offset); + debugs(20, 7, "storeSwapOut: mem_obj->inmem_lo = " << mem_obj->inmem_lo); + debugs(20, 7, "storeSwapOut: mem_obj->endOffset() = " << mem_obj->endOffset()); + debugs(20, 7, "storeSwapOut: swapout.queue_offset = " << mem_obj->swapout.queue_offset); if (mem_obj->swapout.sio != NULL) - debugs(20, 7, "storeSwapOut: storeOffset() = " << (int) mem_obj->swapout.sio->offset() ); + debugs(20, 7, "storeSwapOut: storeOffset() = " << mem_obj->swapout.sio->offset() ); ssize_t swapout_maxsize = (ssize_t) (mem_obj->endOffset() - mem_obj->swapout.queue_offset); @@ -202,7 +202,7 @@ StoreEntry::swapOut() off_t const lowest_offset = mem_obj->lowestMemReaderOffset(); - debugs(20, 7, "storeSwapOut: lowest_offset = " << (int) lowest_offset); + debugs(20, 7, "storeSwapOut: lowest_offset = " << lowest_offset); /* * Grab the swapout_size and check to see whether we're going to defer @@ -239,7 +239,7 @@ StoreEntry::swapOut() if (!swapOutAble()) return; - debugs(20, 7, "storeSwapOut: swapout_size = " << (int) swapout_maxsize); + debugs(20, 7, "storeSwapOut: swapout_size = " << swapout_maxsize); if (swapout_maxsize == 0) { if (store_status == STORE_OK) diff --git a/src/tests/stub_MemObject.cc b/src/tests/stub_MemObject.cc index 6a7cd54781..197bba4b91 100644 --- a/src/tests/stub_MemObject.cc +++ b/src/tests/stub_MemObject.cc @@ -1,5 +1,5 @@ /* - * $Id: stub_MemObject.cc,v 1.6 2007/04/28 22:26:52 hno Exp $ + * $Id: stub_MemObject.cc,v 1.7 2007/04/30 16:56:19 wessels Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Robert Collins @@ -133,7 +133,7 @@ void MemObject::write(StoreIOBuffer writeBuffer, STMCB *callback, void *callbackData) { PROF_start(MemObject_write); - debugs(19, 6, "memWrite: offset " << (unsigned long)writeBuffer.offset << " len " << (long)writeBuffer.length); + debugs(19, 6, "memWrite: offset " << writeBuffer.offset << " len " << writeBuffer.length); /* the offset is into the content, not the headers */ writeBuffer.offset += (_reply ? _reply->hdr_sz : 0); diff --git a/src/tunnel.cc b/src/tunnel.cc index 95663f55fb..fb1814a843 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -1,6 +1,6 @@ /* - * $Id: tunnel.cc,v 1.167 2007/04/28 22:26:38 hno Exp $ + * $Id: tunnel.cc,v 1.168 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -227,7 +227,7 @@ SslStateData::readServer(char *buf, size_t len, comm_err_t errcode, int xerrno) if (errcode == COMM_ERR_CLOSING) return; - debugs(26, 3, "sslReadServer: FD " << server.fd() << ", read " << (int)len << " bytes"); + debugs(26, 3, "sslReadServer: FD " << server.fd() << ", read " << len << " bytes"); if (len > 0) { server.bytesIn(len); @@ -276,7 +276,7 @@ SslStateData::readClient(char *buf, size_t len, comm_err_t errcode, int xerrno) if (errcode == COMM_ERR_CLOSING) return; - debugs(26, 3, "sslReadClient: FD " << client.fd() << ", read " << (int) len << " bytes"); + debugs(26, 3, "sslReadClient: FD " << client.fd() << ", read " << len << " bytes"); if (len > 0) { client.bytesIn(len); @@ -323,7 +323,7 @@ SslStateData::WriteServerDone(int fd, char *buf, size_t len, comm_err_t flag, in void SslStateData::writeServerDone(char *buf, size_t len, comm_err_t flag, int xerrno) { - debugs(26, 3, "sslWriteServer: FD " << server.fd() << ", " << (int)len << " bytes written"); + debugs(26, 3, "sslWriteServer: FD " << server.fd() << ", " << len << " bytes written"); /* Error? */ if (len < 0 || flag != COMM_OK) { @@ -381,7 +381,7 @@ SslStateData::Connection::dataSent (size_t amount) void SslStateData::writeClientDone(char *buf, size_t len, comm_err_t flag, int xerrno) { - debugs(26, 3, "sslWriteClient: FD " << client.fd() << ", " << (int)len << " bytes written"); + debugs(26, 3, "sslWriteClient: FD " << client.fd() << ", " << len << " bytes written"); /* Error? */ if (len < 0 || flag != COMM_OK) { diff --git a/src/unlinkd.cc b/src/unlinkd.cc index cd36c8a28d..3f8f5e18a0 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -1,6 +1,6 @@ /* - * $Id: unlinkd.cc,v 1.63 2007/04/29 17:35:52 hno Exp $ + * $Id: unlinkd.cc,v 1.64 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 2 Unlink Daemon * AUTHOR: Duane Wessels @@ -244,7 +244,7 @@ IPC_FIFO, #ifdef _SQUID_MSWIN_ - debugs(2, 4, "Unlinkd handle: 0x" << std::hex << (unsigned)hIpc << std::dec << ", PID: " << pid); + debugs(2, 4, "Unlinkd handle: 0x" << std::hex << hIpc << std::dec << ", PID: " << pid); #endif diff --git a/src/wccp.cc b/src/wccp.cc index ab8eee3b16..a3c6e26953 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -1,6 +1,6 @@ /* - * $Id: wccp.cc,v 1.42 2007/04/28 22:26:38 hno Exp $ + * $Id: wccp.cc,v 1.43 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Glenn Chisholm @@ -159,7 +159,7 @@ wccpConnectionOpen(void) NULL, 0); - debugs(1, 1, "Accepting WCCP messages on port " << (int) port << ", FD " << theWccpConnection << "."); + debugs(1, 1, "Accepting WCCP messages on port " << port << ", FD " << theWccpConnection << "."); router_len = sizeof(router); diff --git a/src/wccp2.cc b/src/wccp2.cc index 639760a0c6..03e443180d 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -1,6 +1,6 @@ /* - * $Id: wccp2.cc,v 1.15 2007/04/28 22:26:38 hno Exp $ + * $Id: wccp2.cc,v 1.16 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Steven Wilton @@ -982,7 +982,7 @@ wccp2ConnectionOpen(void) NULL, 0); - debugs(80, 1, "Accepting WCCPv2 messages on port " << (int) port << ", FD " << theWccp2Connection << "."); + debugs(80, 1, "Accepting WCCPv2 messages on port " << port << ", FD " << theWccp2Connection << "."); debugs(80, 1, "Initialising all WCCPv2 lists"); /* Initialise all routers on all services */ @@ -1485,7 +1485,7 @@ wccp2HandleUdp(int sock, void *not_used) eventDelete(wccp2AssignBuckets, NULL); eventAdd("wccp2AssignBuckets", wccp2AssignBuckets, NULL, 15.0, 1); } else { - debugs(80, 5, "Change not detected (" << (int) ntohl(router_view_header->change_number) << " = " << router_list_ptr->member_change << ")"); + debugs(80, 5, "Change not detected (" << ntohl(router_view_header->change_number) << " = " << router_list_ptr->member_change << ")"); } } else { eventDelete(wccp2AssignBuckets, NULL); @@ -1562,7 +1562,7 @@ wccp2HereIam(void *voidnotused) wccp2_update_md5_security(service_list_ptr->wccp_password, (char *) service_list_ptr->security_info, service_list_ptr->wccp_packet, service_list_ptr->wccp_packet_size); } - debugs(80, 3, "Sending HereIam packet size " << (int) service_list_ptr->wccp_packet_size); + debugs(80, 3, "Sending HereIam packet size " << service_list_ptr->wccp_packet_size); /* Send the packet */ if (wccp2_numrouters > 1) { diff --git a/src/whois.cc b/src/whois.cc index 0f923091b8..02d01ff384 100644 --- a/src/whois.cc +++ b/src/whois.cc @@ -1,6 +1,6 @@ /* - * $Id: whois.cc,v 1.42 2007/04/30 16:38:19 wessels Exp $ + * $Id: whois.cc,v 1.43 2007/04/30 16:56:09 wessels Exp $ * * DEBUG: section 75 WHOIS protocol * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -146,7 +146,7 @@ WhoisState::readReply (int fd, char *buf, size_t len, comm_err_t flag, int xerrn } buf[len] = '\0'; - debugs(75, 3, "whoisReadReply: FD " << fd << " read " << (int)len << " bytes"); + debugs(75, 3, "whoisReadReply: FD " << fd << " read " << len << " bytes"); debugs(75, 5, "{" << buf << "}"); if (flag == COMM_OK && len > 0) {