return mb;
}
-#if DEAD_CODE
-MemBuf *
-httpPackedReply(Http::StatusCode status, const char *ctype, int64_t clen, time_t lmt, time_t expires)
-{
- HttpReply *rep = new HttpReply;
- rep->setHeaders(status, ctype, NULL, clen, lmt, expires);
- MemBuf *mb = rep->pack();
- delete rep;
- return mb;
-}
-#endif
-
HttpReply *
HttpReply::make304() const
{
void httpReplyInitModule(void);
-#if DEAD_CODE
-/** do everything in one call: init, set, pack, clean, return MemBuf */
-MemBuf *httpPackedReply(Http::ProtocolVersion ver, Http::StatusCode status, const char *ctype, int64_t clen, time_t lmt, time_t expires);
-#endif
-
/* Sync changes here with HttpReply.cc */
class HttpHdrContRange;
*
* Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
*/
-#ifndef SQUID_ACLSOURCEASN_H
-#define SQUID_ACLSOURCEASN_H
-
-#if 0
-#include "acl/Asn.h"
-#endif
-
-class ACLChecklist;
+#ifndef SQUID_ACL_SOURCEASN_H
+#define SQUID_ACL_SOURCEASN_H
#include "acl/Strategy.h"
#include "ip/Address.h"
+class ACLChecklist;
+
class ACLSourceASNStrategy : public ACLStrategy<Ip::Address>
{
ACLSourceASNStrategy&operator=(ACLSourceASNStrategy const &);
};
-#endif /* SQUID_ACLSOURCEASN_H */
+#endif /* SQUID_ACL_SOURCEASN_H */
b->tcp_keepalive = tcp_keepalive;
#if 0
- // AYJ: 2009-07-18: for now SSL does not clone. Configure separate ports with IPs and SSL settings
+ // TODO: AYJ: 2009-07-18: for now SSL does not clone. Configure separate ports with IPs and SSL settings
#if USE_SSL
char *cert;
* age calculation is performed by adjusting the timestamp in
* StoreEntry::timestampsSet(), not here.
*/
-#if DEAD_CODE
- // XXX: realy useless? or is there a bug now that this is detatched from the below if-sequence ?
- // looks like this pre-if was supposed to be the browser workaround...
- if (NULL == http->storeEntry())
- (void) 0;
- else if (http->storeEntry()->timestamp < 0)
- (void) 0;
-#endif
-
if (EBIT_TEST(http->storeEntry()->flags, ENTRY_SPECIAL)) {
hdr->delById(HDR_DATE);
hdr->insertTime(HDR_DATE, squid_curtime);
}
- /* Squid seems to be working fine without this code. With this code,
- * we leak memory on many connect requests because of EINPROGRESS.
- * If you find that this code is needed, please file a bug report. */
-#if 0
-#if _SQUID_LINUX_
- /* 2007-11-27:
- * Linux Debian replaces our allocated AI pointer with garbage when
- * connect() fails. This leads to segmentation faults deallocating
- * the system-allocated memory when we go to clean up our pointer.
- * HACK: is to leak the memory returned since we can't deallocate.
- */
- if (errno != 0) {
- AI = NULL;
- }
-#endif
-#endif
-
address.FreeAddrInfo(AI);
PROF_stop(comm_connect_addr);
serverConn = NULL;
if (Comm::IsConnOpen(serverConn)) {
flags.connected_okay = true;
-#if 0
- if (!serverConn->getPeer())
- serverConn->peerType = HIER_DIRECT;
-#endif
++n_tries;
request->flags.pinned = true;
if (pinned_connection->pinnedAuth())
}
}
-/// \ingroup FQDNCacheAPI
-#if 0
-const char *
-fqdnFromAddr(const Ip::Address &addr)
-{
- const char *n;
- static char buf[MAX_IPSTRLEN];
-
- if (Config.onoff.log_fqdn && (n = fqdncache_gethostbyaddr(addr, 0)))
- return n;
-
-/// \todo Perhapse this should use toHostname() instead of straight NtoA.
-/// that would wrap the IPv6 properly when raw.
- addr.NtoA(buf, MAX_IPSTRLEN);
-
- return buf;
-}
-#endif
-
/// \ingroup FQDNCacheInternal
static void
fqdncacheLockEntry(fqdncache_entry * f)
/*TODO: remove this file as unused*/
#include "squid.h"
-#if 0
-#include "StoreFileSystem.h"
-#endif
-
#include "fs/ufs/StoreFSufs.h"
#include "fs/ufs/UFSSwapDir.h"
-#if 0
-#include "DiskIO/DiskIOModule.h"
-#endif
-
/* Unused variable: */
Fs::Ufs::StoreFSufs<Fs::Ufs::UFSSwapDir> *UfsInstance_foo = NULL;
/* failed() closes ctrl.conn and frees ftpState */
}
-#if DEAD_CODE // obsoleted by ERR_DIR_LISTING
-void
-FtpStateData::listingFinish()
-{
- // TODO: figure out what this means and how to show it ...
-
- if (flags.listformat_unknown && !flags.tried_nlst) {
- printfReplyBody("<a href=\"%s/;type=d\">[As plain directory]</a>\n",
- flags.dir_slash ? rfc1738_escape_part(old_filepath) : ".");
- } else if (typecode == 'D') {
- const char *path = flags.dir_slash ? filepath : ".";
- printfReplyBody("<a href=\"%s/\">[As extended directory]</a>\n", rfc1738_escape_part(path));
- }
-}
-#endif /* DEAD_CODE */
-
/// \ingroup ServerProtocolFTPInternal
static const char *Month[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
#if USE_ICMP
#define S_ICMP_ECHO 1
-#if DEAD_CODE
-#define S_ICMP_ICP 2
-#endif
#define S_ICMP_DOM 3
static void * hIpc;
#endif
}
-#if 0 // AYJ: Looks to be unused code.
-int
-netdbHops(Ip::Address &addr)
-{
-#if USE_ICMP
- netdbEntry *n = netdbLookupAddr(addr);
-
- if (n && n->pings_recv) {
- n->last_use_time = squid_curtime;
- return (int) (n->hops + 0.5);
- }
-
-#endif
- return 256;
-}
-#endif
-
void
netdbDump(StoreEntry * sentry)
{
if (nodns) {
want.ai_flags = AI_NUMERICHOST; // prevent actual DNS lookups!
}
-#if 0
- else if (!Ip::EnableIpv6)
- want.ai_family = AF_INET; // maybe prevent IPv6 DNS lookups.
-#endif
if ( (err = getaddrinfo(s, NULL, &want, &res)) != 0) {
debugs(14,3, HERE << "Given Non-IP '" << s << "': " << gai_strerror(err) );
storeAppendPrintf(s, "req_sz %ld\n", (long int) http->req_sz);
e = http->storeEntry();
storeAppendPrintf(s, "entry %p/%s\n", e, e ? e->getMD5Text() : "N/A");
-#if 0
- /* Not a member anymore */
- e = http->old_entry;
- storeAppendPrintf(s, "old_entry %p/%s\n", e, e ? e->getMD5Text() : "N/A");
-#endif
-
storeAppendPrintf(s, "start %ld.%06d (%f seconds ago)\n",
(long int) http->start_time.tv_sec,
(int) http->start_time.tv_usec,