/*
- * $Id: asn.cc,v 1.32 1998/05/01 17:37:12 wessels Exp $
+ * $Id: asn.cc,v 1.33 1998/05/08 23:29:25 wessels Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
*t = '\0';
addr = inet_addr(as_string);
bitl = atoi(t + 1);
-#if 0
- mask = (1 << bitl) - 1;
-#else
if (bitl < 0)
bitl = 0;
if (bitl > 32)
bitl = 32;
mask = bitl ? 0xfffffffful << (32 - bitl) : 0;
-#endif
in_a.s_addr = addr;
in_m.s_addr = mask;
/*
- * $Id: errorpage.cc,v 1.130 1998/05/08 22:35:06 wessels Exp $
+ * $Id: errorpage.cc,v 1.131 1998/05/08 23:29:26 wessels Exp $
*
* DEBUG: section 4 Error Generation
* AUTHOR: Duane Wessels
{
HttpReply *rep;
MemObject *mem = entry->mem_obj;
-#if 0
/*
* Kostas sez PUT "success" replies might not be STORE_PENDING?
*/
- assert(entry->store_status == STORE_PENDING);
-#endif
+ /* assert(entry->store_status == STORE_PENDING); */
assert(mem != NULL);
assert(mem->inmem_hi == 0);
storeBuffer(entry);
/*
- * $Id: ipcache.cc,v 1.182 1998/04/24 07:09:37 wessels Exp $
+ * $Id: ipcache.cc,v 1.183 1998/05/08 23:29:27 wessels Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
ipcache_release(i);
}
-#if OLD_CODE
-void
-ipcacheCycleAddr(const char *name)
-{
- ipcache_entry *i;
- unsigned char fullcircle;
- if ((i = ipcache_get(name)) == NULL)
- return;
- if (i->status != IP_CACHED)
- return;
- ia = &i->addrs;
- fullcircle = ia->cur;
- while (ia->bad_mask[ia->cur]) {
- if (++ia->cur == ia->count)
- ia->cur = 0;
- if (ia->cur == fullcircle) { /* All bad, just use next one */
- if (++ia->cur == ia->count)
- ia->cur = 0;
- break;
- }
- }
-}
-#endif
-
void
ipcacheCycleAddr(const char *name, ipcache_addrs * ia)
{
/*
- * $Id: mime.cc,v 1.64 1998/05/05 03:49:59 wessels Exp $
+ * $Id: mime.cc,v 1.65 1998/05/08 23:29:28 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
return NULL;
}
-#if OLD_CODE
-/* need to take the lowest, non-zero pointer to the end of the headers.
- * The headers end at the first empty line */
-char *
-mime_headers_end(const char *mime)
-{
- const char *p1, *p2;
- const char *end = NULL;
- p1 = strstr(mime, "\n\r\n");
- p2 = strstr(mime, "\n\n");
- if (p1 && p2)
- end = p1 < p2 ? p1 : p2;
- else
- end = p1 ? p1 : p2;
- if (end)
- end += (end == p1 ? 3 : 2);
- return (char *) end;
-}
-
-#endif
-
size_t
headersEnd(const char *mime, size_t l)
{
/*
- * $Id: net_db.cc,v 1.94 1998/05/08 21:22:16 wessels Exp $
+ * $Id: net_db.cc,v 1.95 1998/05/08 23:29:28 wessels Exp $
*
* DEBUG: section 37 Network Measurement Database
* AUTHOR: Duane Wessels
snmp_netdbFn(variable_list * Var, snint * ErrP)
{
variable_list *Answer;
-#if 0
- int cnt;
-#endif
static char key[15];
static netdbEntry *n = NULL;
{
MemObject *mem = e->mem_obj;
int npend = NULL == mem ? 0 : mem->nclients;
-#if OLD_CODE
- store_client *sc;
- store_client *nx = NULL;
- if (mem == NULL)
- return 0;
- for (sc = mem->clients; sc; sc = nx) {
- nx = sc->next;
- /* Changed from callback_data to just callback. There can be no use */
- /* for callback_data without a callback, and sc->callback we know */
- /* gets reset, but not necessarily sc->callback_data */
- if (sc->callback == NULL)
- continue;
- npend++;
- }
-#endif
debug(20, 3) ("storePendingNClients: returning %d\n", npend);
return npend;
}
/*
- * $Id: store_dir.cc,v 1.65 1998/05/07 20:49:19 wessels Exp $
+ * $Id: store_dir.cc,v 1.66 1998/05/08 23:29:30 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
if (store_rebuilding) {
debug(20, 1) ("Not currently OK to rewrite swap log.\n");
debug(20, 1) ("storeDirWriteCleanLogs: Operation aborted.\n");
-#if DONT
- /*
- * why did we want to close the current swap logs here?
- * DW/1.2.beta19
- */
- storeDirCloseSwapLogs();
-#endif
return 0;
}
debug(20, 1) ("storeDirWriteCleanLogs: Starting...\n");
/*
- * $Id: store_rebuild.cc,v 1.35 1998/04/27 19:16:12 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.36 1998/05/08 23:29:30 wessels Exp $
*
* DEBUG: section 20 Store Rebuild Routines
* AUTHOR: Duane Wessels
continue;
}
tmpe.key = key;
-#if OLD_CODE
- if (tmpe.swap_file_sz == 0) {
- RebuildState.invalid++;
- x = log(++RebuildState.zero_object_sz) / log(10.0);
- if (0.0 == x - (double) (int) x)
- debug(20, 1) ("WARNING: %d swapfiles found with ZERO size\n",
- RebuildState.zero_object_sz);
- storeUnlinkFileno(sfileno);
- continue;
- }
-#endif
/* check sizes */
if (tmpe.swap_file_sz == 0) {
tmpe.swap_file_sz = sb.st_size;
/*
- * $Id: url.cc,v 1.90 1998/05/08 06:34:59 wessels Exp $
+ * $Id: url.cc,v 1.91 1998/05/08 23:29:31 wessels Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
xstrncpy(request->host, host, SQUIDHOSTNAMELEN);
xstrncpy(request->login, login, MAX_LOGIN_SZ);
request->port = (u_short) port;
-#if OLD_CODE
- xstrncpy(request->urlpath, urlpath, MAX_URL);
-#else
stringReset(&request->urlpath, urlpath);
-#endif
request->max_age = -1;
request->max_forwards = -1;
return request;
request = memAllocate(MEM_REQUEST_T);
request->method = method;
request->protocol = PROTO_URN;
-#if OLD_CODE
- xstrncpy(request->urlpath, &urn[4], MAX_URL);
-#else
stringReset(&request->urlpath, urn + 4);
-#endif
request->max_age = -1;
request->max_forwards = -1;
return request;
/*
*
- * $Id: urn.cc,v 1.30 1998/05/08 21:59:49 wessels Exp $
+ * $Id: urn.cc,v 1.31 1998/05/08 23:29:32 wessels Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
if (strncasecmp(strBuf(r->urlpath), "menu.", 5) == 0) {
char *new_path = xstrdup(strBuf(r->urlpath) + 5);
EBIT_SET(urnState->flags, URN_FORCE_MENU);
-#if OLD_CODE
- t = xstrdup(strBuf(r->urlpath) + 5);
- xstrncpy(r->urlpath, t, MAX_URL);
- xfree(t);
-#else
stringReset(&r->urlpath, new_path);
xfree(new_path);
-#endif
}
if ((t = strChr(r->urlpath, ':')) != NULL) {
strSet(r->urlpath, t, '\0');