/*
- * $Id: asn.cc,v 1.13 1998/01/12 04:29:55 wessels Exp $
+ * $Id: asn.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
lh = ntohl(addr.s_addr);
debug(53, 4) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr));
- if (AS_tree_head == 0 || !memcmp(&addr, &no_addr,sizeof(addr)))
+ if (AS_tree_head == 0 || !memcmp(&addr, &no_addr, sizeof(addr)))
return 0;
store_m_int(lh, m_addr);
rn = rn_match(m_addr, AS_tree_head);
{
debug(0, 0) ("asnFreeMemory: Calling asnCleanup()!\n");
- /* XXX - Cleanup is enough. */
+ /* XXX - Cleanup is enough. */
asnCleanup();
}
while (*s && isspace(*s))
s++;
}
- /* XXX why assert that ? */
+ /* XXX why assert that ? */
#if 0
assert(e->mem_obj->reply);
#endif
/*
- * $Id: cbdata.cc,v 1.13 1998/01/12 04:29:56 wessels Exp $
+ * $Id: cbdata.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $
*
* DEBUG: section 45 Callback Data Registry
* AUTHOR: Duane Wessels
xfree(c);
debug(45, 3) ("cbdataFree: freeing %p\n", p);
if (mem_type == MEM_NONE)
- xfree(p);
+ xfree(p);
else
memFree(mem_type, p);
}
cbdataCount--;
xfree(c);
debug(45, 3) ("cbdataUnlock: Freeing %p\n", p);
- xfree((void *)p);
+ xfree((void *) p);
}
int
+
/*
- * $Id: client.cc,v 1.48 1998/01/06 00:27:56 wessels Exp $
+ * $Id: client.cc,v 1.49 1998/01/12 04:30:36 wessels Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
/*
- * $Id: debug.cc,v 1.56 1998/01/07 22:45:25 wessels Exp $
+ * $Id: debug.cc,v 1.57 1998/01/12 04:30:36 wessels Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
fflush(debug_log);
if (opt_debug_stderr && debug_log != stderr) {
#if defined(__QNX__)
- vfprintf(stderr, f, eargs);
+ vfprintf(stderr, f, eargs);
#else
vfprintf(stderr, f, args);
#endif
/*
- * $Id: dns.cc,v 1.50 1998/01/12 04:29:59 wessels Exp $
+ * $Id: dns.cc,v 1.51 1998/01/12 04:30:36 wessels Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
* -- Michael O'Reilly <michael@metal.iinet.net.au>
*/
if (fd > 2)
- close(fd);
+ close(fd);
close(cfd);
if (Config.onoff.res_defnames)
execlp(command, "(dnsserver)", "-D", NULL);
SNMP_C_USER,
SNMP_C_COMMUNITY
};
+
#endif
typedef enum {
- MEM_NONE,
- MEM_DISK_BUF,
- MEM_STMEM_BUF,
- MEM_4K_BUF,
- MEM_8K_BUF,
- MEM_ACL_IP_DATA,
- MEM_ACL_TIME_DATA,
- MEM_ACL_NAME_LIST,
- MEM_ACL_DENY_INFO_LIST,
- MEM_ACL,
+ MEM_NONE,
+ MEM_DISK_BUF,
+ MEM_STMEM_BUF,
+ MEM_4K_BUF,
+ MEM_8K_BUF,
+ MEM_ACL_IP_DATA,
+ MEM_ACL_TIME_DATA,
+ MEM_ACL_NAME_LIST,
+ MEM_ACL_DENY_INFO_LIST,
+ MEM_ACL,
#if SQUID_SNMP
- MEM_SNMPCONF,
+ MEM_SNMPCONF,
#endif
- MEM_ACL_LIST,
- MEM_ACL_ACCESS,
- MEM_ACLCHECK_T,
- MEM_AIO_RESULT_T,
- MEM_WORDLIST,
- MEM_INTLIST,
- MEM_USHORTLIST,
- MEM_RELIST,
- MEM_SQUIDCONFIG,
- MEM_SQUIDCONFIG2,
- MEM_CLOSE_HANDLER,
- MEM_DREAD_CTRL,
- MEM_DNSSERVER_T,
- MEM_DNSSTATDATA,
- MEM_DWRITE_Q,
- MEM_FILEMAP,
- MEM_FQDNCACHE_ENTRY,
- MEM_HASH_LINK,
- MEM_HASH_TABLE,
- MEM_HTTP_REPLY,
- MEM_HTTPSTATEDATA,
- MEM_ICPUDPDATA,
- MEM_CLIENTHTTPREQUEST,
- MEM_CONNSTATEDATA,
- MEM_IPCACHE_ADDRS,
- MEM_IPCACHE_ENTRY,
- MEM_DOMAIN_PING,
- MEM_DOMAIN_TYPE,
- MEM_PEER,
- MEM_NET_DB_NAME,
- MEM_NET_DB_PEER,
- MEM_NETDBENTRY,
- MEM_ICP_PING_DATA,
- MEM_PS_STATE,
- MEM_HIERARCHYLOGENTRY,
- MEM_PINGERECHODATA,
- MEM_PINGERREPLYDATA,
- MEM_ICP_COMMON_T,
- MEM_PROTO_STAT,
- MEM_META_DATA,
- MEM_CACHEINFO,
- MEM_IOSTATS,
- MEM_MEM_NODE,
- MEM_MEM_HDR,
- MEM_STORE_CLIENT,
- MEM_MEMOBJECT,
- MEM_STOREENTRY,
- MEM_SWAPDIR,
- MEM_REQUEST_T,
- MEM_ACCESSLOGENTRY,
- MEM_CACHEMGR_PASSWD,
- MEM_REFRESH_T,
- MEM_COMMWRITESTATEDATA,
- MEM_ERRORSTATE,
- MEM_DLINK_NODE,
- MEM_DLINK_LIST,
- MEM_STATCOUNTERS,
- MEM_MAX
+ MEM_ACL_LIST,
+ MEM_ACL_ACCESS,
+ MEM_ACLCHECK_T,
+ MEM_AIO_RESULT_T,
+ MEM_WORDLIST,
+ MEM_INTLIST,
+ MEM_USHORTLIST,
+ MEM_RELIST,
+ MEM_SQUIDCONFIG,
+ MEM_SQUIDCONFIG2,
+ MEM_CLOSE_HANDLER,
+ MEM_DREAD_CTRL,
+ MEM_DNSSERVER_T,
+ MEM_DNSSTATDATA,
+ MEM_DWRITE_Q,
+ MEM_FILEMAP,
+ MEM_FQDNCACHE_ENTRY,
+ MEM_HASH_LINK,
+ MEM_HASH_TABLE,
+ MEM_HTTP_REPLY,
+ MEM_HTTPSTATEDATA,
+ MEM_ICPUDPDATA,
+ MEM_CLIENTHTTPREQUEST,
+ MEM_CONNSTATEDATA,
+ MEM_IPCACHE_ADDRS,
+ MEM_IPCACHE_ENTRY,
+ MEM_DOMAIN_PING,
+ MEM_DOMAIN_TYPE,
+ MEM_PEER,
+ MEM_NET_DB_NAME,
+ MEM_NET_DB_PEER,
+ MEM_NETDBENTRY,
+ MEM_ICP_PING_DATA,
+ MEM_PS_STATE,
+ MEM_HIERARCHYLOGENTRY,
+ MEM_PINGERECHODATA,
+ MEM_PINGERREPLYDATA,
+ MEM_ICP_COMMON_T,
+ MEM_PROTO_STAT,
+ MEM_META_DATA,
+ MEM_CACHEINFO,
+ MEM_IOSTATS,
+ MEM_MEM_NODE,
+ MEM_MEM_HDR,
+ MEM_STORE_CLIENT,
+ MEM_MEMOBJECT,
+ MEM_STOREENTRY,
+ MEM_SWAPDIR,
+ MEM_REQUEST_T,
+ MEM_ACCESSLOGENTRY,
+ MEM_CACHEMGR_PASSWD,
+ MEM_REFRESH_T,
+ MEM_COMMWRITESTATEDATA,
+ MEM_ERRORSTATE,
+ MEM_DLINK_NODE,
+ MEM_DLINK_LIST,
+ MEM_STATCOUNTERS,
+ MEM_MAX
} mem_type;
enum {
/*
- * $Id: fqdncache.cc,v 1.77 1998/01/06 05:15:40 wessels Exp $
+ * $Id: fqdncache.cc,v 1.78 1998/01/12 04:30:37 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
}
fqdncacheUnlockEntry(f); /* unlock from FQDN_DISPATCHED */
} else {
- debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n");
- commSetSelect(fd,
- COMM_SELECT_READ,
- fqdncache_dnsHandleRead,
- dnsData,
- 0);
+ debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n");
+ commSetSelect(fd,
+ COMM_SELECT_READ,
+ fqdncache_dnsHandleRead,
+ dnsData,
+ 0);
}
if (dnsData->offset == 0) {
dnsData->data = NULL;
EBIT_CLR(dnsData->flags, HELPER_BUSY);
- if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN))
- dnsShutdownServer(dnsData);
- cbdataUnlock(dnsData);
+ if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN))
+ dnsShutdownServer(dnsData);
+ cbdataUnlock(dnsData);
}
fqdncacheNudgeQueue();
}
/*
- * $Id: ftp.cc,v 1.186 1998/01/12 04:30:01 wessels Exp $
+ * $Id: ftp.cc,v 1.187 1998/01/12 04:30:38 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
*(parts->showname + width - 0) = '\0';
}
}
-
switch (parts->type) {
case 'd':
snprintf(icon, 2048, "<IMG SRC=\"%s%s\" ALT=\"%-6s\">",
/*
- * $Id: globals.h,v 1.26 1998/01/12 04:30:01 wessels Exp $
+ * $Id: globals.h,v 1.27 1998/01/12 04:30:39 wessels Exp $
*/
extern FILE *debug_log; /* NULL */
extern char *err_type_str[];
extern char *icp_opcode_str[];
extern struct radix_node_head *AS_tree_head;
-extern double request_failure_ratio; /* 0.0 */
+extern double request_failure_ratio; /* 0.0 */
#ifdef HAVE_SYSLOG
extern int _db_level;
/*
- * $Id: http.cc,v 1.233 1998/01/12 04:30:03 wessels Exp $
+ * $Id: http.cc,v 1.234 1998/01/12 04:30:39 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
if (EBIT_TEST(request->flags, REQ_USED_PROXY_AUTH))
continue;
if (strncasecmp(xbuf, "Connection:", 11) == 0) {
- handleConnectionHeader(0, no_forward, &xbuf[11]);
+ handleConnectionHeader(0, no_forward, &xbuf[11]);
continue;
- }
+ }
if (strncasecmp(xbuf, "Host:", 5) == 0) {
EBIT_SET(hdr_flags, HDR_HOST);
} else if (strncasecmp(xbuf, "Cache-Control:", 14) == 0) {
snprintf(xbuf, 4096, "Max-Forwards: %d", n - 1);
}
}
- if (!handleConnectionHeader(1, no_forward, xbuf))
+ if (!handleConnectionHeader(1, no_forward, xbuf))
httpAppendRequestHeader(hdr_out, xbuf, &len, out_sz - 512, 1);
}
hdr_len = t - hdr_in;
debug(12, 5) ("icpHandleIcpV2: OPCODE %s\n", icp_opcode_str[header.opcode]);
if (icpCheckUdpHit(entry, icp_request)) {
pkt_len = sizeof(icp_common_t) + strlen(url) + 1 + 2 + entry->object_len;
- reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
- icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol);
- break;
+ reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
+ icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol);
+ break;
}
/* if store is rebuilding, return a UDP_HIT, but not a MISS */
if (store_rebuilding && opt_reload_hit_only) {
/*
- * $Id: main.cc,v 1.207 1998/01/12 04:30:05 wessels Exp $
+ * $Id: main.cc,v 1.208 1998/01/12 04:30:40 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
debug(1, 0) ("Ready to serve requests.\n");
}
-static void
+static void
setEffectiveUser(void)
{
leave_suid(); /* Run as non privilegied user */
/* NOTREACHED */
}
if (opt_create_swap_dirs) {
- if (ConfigFile == NULL)
- ConfigFile = xstrdup(DefaultConfigFile);
- cbdataInit();
- parseConfigFile(ConfigFile);
- setEffectiveUser();
- debug(0, 0)("Creating Swap Directories\n");
- storeCreateSwapDirectories();
- return 0;
- }
+ if (ConfigFile == NULL)
+ ConfigFile = xstrdup(DefaultConfigFile);
+ cbdataInit();
+ parseConfigFile(ConfigFile);
+ setEffectiveUser();
+ debug(0, 0) ("Creating Swap Directories\n");
+ storeCreateSwapDirectories();
+ return 0;
+ }
if (!opt_no_daemon)
watch_child(argv);
setMaxFD();
+
/*
- * $Id: mime.cc,v 1.45 1998/01/12 04:30:05 wessels Exp $
+ * $Id: mime.cc,v 1.46 1998/01/12 04:30:41 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived