/*
- * $Id: cache_cf.cc,v 1.110 1996/10/15 18:05:56 wessels Exp $
+ * $Id: cache_cf.cc,v 1.111 1996/10/15 18:06:22 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
Config.dnsChildren = DefaultDnsChildrenMax;
}
if (Config.Program.redirect) {
- if (Config.redirectChildren < 1) {
+ if (Config.redirectChildren < 1) {
Config.redirectChildren = 0;
safe_free(Config.Program.redirect);
- } else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
+ } else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
printf("WARNING: redirect_children was set to a bad value: %d\n",
- Config.redirectChildren);
+ Config.redirectChildren);
printf("Setting it to the maximum (%d).\n", DefaultRedirectChildrenMax);
Config.redirectChildren = DefaultRedirectChildrenMax;
- }
+ }
}
fclose(fp);
configDoConfigure();
/*
- * $Id: ftp.cc,v 1.66 1996/10/15 16:40:06 wessels Exp $
+ * $Id: ftp.cc,v 1.67 1996/10/15 18:06:23 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
squid_error_entry(entry, ERR_FTP_DISABLED, NULL);
return COMM_ERROR;
}
-
ftpData = xcalloc(1, sizeof(FtpStateData));
storeLockObject(ftpData->entry = entry, NULL, NULL);
ftpData->request = requestLink(request);
struct timeval slp;
if (!strcmp(ftpget, "none")) {
- debug(9, 1, "ftpInitialize: ftpget is disabled.\n");
+ debug(9, 1, "ftpInitialize: ftpget is disabled.\n");
return -1;
}
debug(9, 5, "ftpInitialize: Initializing...\n");
/*
- * $Id: ipcache.cc,v 1.73 1996/10/15 18:05:58 wessels Exp $
+ * $Id: ipcache.cc,v 1.74 1996/10/15 18:06:24 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
static ipcache_entry *ipcache_create _PARAMS((char *name));
static void ipcache_add_to_hash _PARAMS((ipcache_entry *));
static void ipcache_call_pending _PARAMS((ipcache_entry *));
-static ipcache_entry * ipcacheAddNew _PARAMS((char *, struct hostent *, ipcache_status_t));
+static ipcache_entry *ipcacheAddNew _PARAMS((char *, struct hostent *, ipcache_status_t));
static void ipcacheAddHostent _PARAMS((ipcache_entry *, struct hostent *));
static int ipcacheHasPending _PARAMS((ipcache_entry *));
static ipcache_entry *ipcache_get _PARAMS((char *));
}
static void
-ipcacheAddHostent(ipcache_entry *i, struct hostent *hp)
+ipcacheAddHostent(ipcache_entry * i, struct hostent *hp)
{
- int addr_count = 0;
- int k;
- safe_free(i->addrs.in_addrs);
- while ((addr_count < 255) && *(hp->h_addr_list + addr_count))
- ++addr_count;
- i->addrs.count = (unsigned char) addr_count;
- i->addrs.in_addrs = xcalloc(addr_count, sizeof(struct in_addr));
- for (k = 0; k < addr_count; k++)
- memcpy(&i->addrs.in_addrs[k].s_addr,
- *(hp->h_addr_list + k),
- hp->h_length);
- i->status = IP_CACHED;
+ int addr_count = 0;
+ int k;
+ safe_free(i->addrs.in_addrs);
+ while ((addr_count < 255) && *(hp->h_addr_list + addr_count))
+ ++addr_count;
+ i->addrs.count = (unsigned char) addr_count;
+ i->addrs.in_addrs = xcalloc(addr_count, sizeof(struct in_addr));
+ for (k = 0; k < addr_count; k++)
+ memcpy(&i->addrs.in_addrs[k].s_addr,
+ *(hp->h_addr_list + k),
+ hp->h_length);
+ i->status = IP_CACHED;
}
static ipcache_entry *
if (i) {
if (i->status == IP_PENDING || i->status == IP_DISPATCHED) {
if (!BIT_TEST(flags, IP_BLOCKING_LOOKUP)) {
- IpcacheStats.pending_hits++;
- return NULL;
+ IpcacheStats.pending_hits++;
+ return NULL;
}
} else if (i->status == IP_NEGATIVE_CACHED) {
IpcacheStats.negative_hits++;
IpcacheStats.misses++;
if ((addrs = ipcacheCheckNumeric(name)))
return addrs;
- if (BIT_TEST(flags,IP_BLOCKING_LOOKUP)) {
+ if (BIT_TEST(flags, IP_BLOCKING_LOOKUP)) {
IpcacheStats.ghbn_calls++;
- debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);
+ debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);
hp = gethostbyname(name);
if (hp && hp->h_name && (hp->h_name[0] != '\0') && ip_table) {
/* good address, cached */
if (i == NULL) {
- i = ipcacheAddNew(name, hp, IP_CACHED);
+ i = ipcacheAddNew(name, hp, IP_CACHED);
} else {
ipcacheAddHostent(i, hp);
}
i->expires = squid_curtime + Config.positiveDnsTtl;
#if LIBRESOLV_DNS_TTL_HACK
if (_dns_ttl_ > -1)
- i->expires = squid_curtime + _dns_ttl_;
+ i->expires = squid_curtime + _dns_ttl_;
#endif /* LIBRESOLV_DNS_TTL_HACK */
return &i->addrs;
}
/*
- * $Id: pinger.cc,v 1.7 1996/10/14 21:29:02 wessels Exp $
+ * $Id: pinger.cc,v 1.8 1996/10/15 18:06:25 wessels Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
pingerRecv();
if (10 + last_check_time > squid_curtime) {
if (send(1, &tv, 0, 0) < 0)
- return 1;
+ return 1;
last_check_time = squid_curtime;
}
}
/*
- * $Id: stat.cc,v 1.87 1996/10/15 04:57:57 wessels Exp $
+ * $Id: stat.cc,v 1.88 1996/10/15 18:06:25 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
meta_data.url_strings +
meta_data.netdb_addrs * sizeof(netdbEntry) +
meta_data.netdb_hosts * sizeof(struct _net_db_name) +
- meta_data.client_info * client_info_sz +
+ meta_data.client_info * client_info_sz +
meta_data.misc;
}
#if LOG_FULL_HEADERS
static char c2x[] =
- "000102030405060708090a0b0c0d0e0f"
- "101112131415161718191a1b1c1d1e1f"
- "202122232425262728292a2b2c2d2e2f"
- "303132333435363738393a3b3c3d3e3f"
- "404142434445464748494a4b4c4d4e4f"
- "505152535455565758595a5b5c5d5e5f"
- "606162636465666768696a6b6c6d6e6f"
- "707172737475767778797a7b7c7d7e7f"
- "808182838485868788898a8b8c8d8e8f"
- "909192939495969798999a9b9c9d9e9f"
- "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
- "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
- "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
- "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
- "e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
- "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
+"000102030405060708090a0b0c0d0e0f"
+"101112131415161718191a1b1c1d1e1f"
+"202122232425262728292a2b2c2d2e2f"
+"303132333435363738393a3b3c3d3e3f"
+"404142434445464748494a4b4c4d4e4f"
+"505152535455565758595a5b5c5d5e5f"
+"606162636465666768696a6b6c6d6e6f"
+"707172737475767778797a7b7c7d7e7f"
+"808182838485868788898a8b8c8d8e8f"
+"909192939495969798999a9b9c9d9e9f"
+"a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
+"b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
+"c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
+"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
+"e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
+"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
/* log_quote -- URL-style encoding on MIME headers. */