/*
- * $Id: acl.cc,v 1.203 1999/05/04 17:40:09 wessels Exp $
+ * $Id: acl.cc,v 1.204 1999/05/19 19:57:34 wessels Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
return aclMatchRegex(ae->data, checklist->browser);
/* NOTREACHED */
case ACL_PROXY_AUTH:
- if (!r->flags.accelerated) {
+ if (NULL == r) {
+ return -1;
+ } else if (!r->flags.accelerated) {
/* Proxy authorization on proxy requests */
header = httpHeaderGetStr(&checklist->request->header,
HDR_PROXY_AUTHORIZATION);
#
-# $Id: cf.data.pre,v 1.154 1999/05/12 16:35:57 wessels Exp $
+# $Id: cf.data.pre,v 1.155 1999/05/19 19:57:36 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
NAME: snmp_incoming_address
TYPE: address
-LOC: Config.Addrs.snmp_outgoing
+LOC: Config.Addrs.snmp_incoming
DEFAULT: 0.0.0.0
IFDEF: SQUID_SNMP
DOC_NONE
/*
- * $Id: client_side.cc,v 1.455 1999/05/11 18:51:47 wessels Exp $
+ * $Id: client_side.cc,v 1.456 1999/05/19 19:57:39 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
debug(33, 4) ("clientCacheHit: Reply code %d != 200\n",
mem->reply->sline.status);
memFree(buf, MEM_CLIENT_SOCK_BUF);
+ http->log_type = LOG_TCP_MISS;
clientProcessMiss(http);
} else if (modifiedSince(e, http->request)) {
http->log_type = LOG_TCP_IMS_HIT;
/*
- * $Id: delay_pools.cc,v 1.9 1999/05/04 21:58:20 wessels Exp $
+ * $Id: delay_pools.cc,v 1.10 1999/05/19 19:57:41 wessels Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
hash_link *lnk;
if (!delay_id_ptr_hash)
return;
+ if (*loc == 0)
+ return;
lnk = xmalloc(sizeof(hash_link));
lnk->key = (char *) loc;
hash_join(delay_id_ptr_hash, lnk);
store_client *sc = storeClientListSearch(e->mem_obj, data);
assert(sc != NULL);
sc->delay_id = delay_id;
+ delayRegisterDelayIdPtr(&sc->delay_id);
}
static void
/*
- * $Id: enums.h,v 1.151 1999/05/10 19:33:23 wessels Exp $
+ * $Id: enums.h,v 1.152 1999/05/19 19:57:42 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
enum {
PING_NONE,
PING_WAITING,
- PING_TIMEOUT,
PING_DONE
};
/*
- * $Id: forward.cc,v 1.59 1999/05/04 20:58:31 wessels Exp $
+ * $Id: forward.cc,v 1.60 1999/05/19 19:57:43 wessels Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
if (mem == NULL)
return 0;
#if DELAY_POOLS
- if (fd > -1)
- if (!delayIsNoDelay(fd))
- if (delayMostBytesWanted(mem, 1) == 0)
- return 1;
+ if (fd < 0)
+ (void) 0;
+ else if (delayIsNoDelay(fd))
+ (void) 0;
+ else if (delayMostBytesWanted(mem, 1) == 0)
+ return 1;
#endif
if (EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT))
return 0;
/*
- * $Id: ftp.cc,v 1.284 1999/05/11 20:14:14 wessels Exp $
+ * $Id: ftp.cc,v 1.285 1999/05/19 19:57:45 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
} ftp_state_t;
struct _ftp_flags {
- int isdir:1;
- int pasv_supported:1;
- int skip_whitespace:1;
- int rest_supported:1;
- int pasv_only:1;
- int authenticated:1;
- int http_header_sent:1;
- int tried_nlst:1;
- int use_base:1;
- int root_dir:1;
- int no_dotdot:1;
- int html_header_sent:1;
- int binary:1;
- int try_slash_hack:1;
- int put:1;
- int put_mkdir:1;
- int listformat_unknown:1;
- int datachannel_hack:1;
+ unsigned int isdir:1;
+ unsigned int pasv_supported:1;
+ unsigned int skip_whitespace:1;
+ unsigned int rest_supported:1;
+ unsigned int pasv_only:1;
+ unsigned int authenticated:1;
+ unsigned int http_header_sent:1;
+ unsigned int tried_nlst:1;
+ unsigned int use_base:1;
+ unsigned int root_dir:1;
+ unsigned int no_dotdot:1;
+ unsigned int html_header_sent:1;
+ unsigned int binary:1;
+ unsigned int try_slash_hack:1;
+ unsigned int put:1;
+ unsigned int put_mkdir:1;
+ unsigned int listformat_unknown:1;
+ unsigned int datachannel_hack:1;
};
typedef struct _Ftpdata {
storeUnlockObject(ftpState->entry);
if (ftpState->reply_hdr) {
memFree(ftpState->reply_hdr, MEM_8K_BUF);
+ /* this seems unnecessary, but people report SEGV's
+ * when freeing memory in this function */
ftpState->reply_hdr = NULL;
}
requestUnlink(ftpState->request);
- if (ftpState->ctrl.buf)
+ if (ftpState->ctrl.buf) {
ftpState->ctrl.freefunc(ftpState->ctrl.buf);
- if (ftpState->data.buf)
+ /* this seems unnecessary, but people report SEGV's
+ * when freeing memory in this function */
+ ftpState->ctrl.buf = NULL;
+ }
+ if (ftpState->data.buf) {
ftpState->data.freefunc(ftpState->data.buf);
+ /* this seems unnecessary, but people report SEGV's
+ * when freeing memory in this function */
+ ftpState->data.buf = NULL;
+ }
if (ftpState->pathcomps)
wordlistDestroy(&ftpState->pathcomps);
if (ftpState->ctrl.message)
/*
- * $Id: main.cc,v 1.298 1999/05/04 21:58:25 wessels Exp $
+ * $Id: main.cc,v 1.299 1999/05/19 19:57:47 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
#endif
for (i = 0; i < Squid_MaxFD; i++)
close(i);
+#if NOT_NEEDED
umask(0);
+#endif
for (;;) {
if ((pid = fork()) == 0) {
/* child */
/*
- * $Id: peer_select.cc,v 1.99 1999/04/23 02:57:28 wessels Exp $
+ * $Id: peer_select.cc,v 1.100 1999/05/19 19:57:49 wessels Exp $
*
* DEBUG: section 44 Peer Selection Algorithm
* AUTHOR: Duane Wessels
StoreEntry *entry = psstate->entry;
if (entry)
debug(44, 3) ("peerPingTimeout: '%s'\n", storeUrl(entry));
- entry->ping_status = PING_TIMEOUT;
if (!cbdataValid(psstate->callback_data)) {
/* request aborted */
+ entry->ping_status = PING_DONE;
cbdataUnlock(psstate->callback_data);
peerSelectStateFree(psstate);
return;
/*
- * $Id: ssl.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $
+ * $Id: ssl.cc,v 1.96 1999/05/19 19:57:50 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
}
#if DELAY_POOLS
/* no point using the delayIsNoDelay stuff since ssl is nice and simple */
- if (g && g->options.no_delay)
+ if (g && g->options.no_delay && sslState->delay_id) {
+ delayUnregisterDelayIdPtr(&sslState->delay_id);
sslState->delay_id = 0;
+ }
#endif
commConnectStart(sslState->server.fd,
sslState->host,
/*
- * $Id: store.cc,v 1.498 1999/05/04 21:58:40 wessels Exp $
+ * $Id: store.cc,v 1.499 1999/05/19 19:57:53 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
{
"PING_NONE",
"PING_WAITING",
- "PING_TIMEOUT",
"PING_DONE"
};
/*
- * $Id: store_client.cc,v 1.67 1999/05/04 21:58:42 wessels Exp $
+ * $Id: store_client.cc,v 1.68 1999/05/19 19:57:54 wessels Exp $
*
* DEBUG: section 20 Storage Manager Client-Side Interface
* AUTHOR: Duane Wessels
*T = sc;
#if DELAY_POOLS
sc->delay_id = 0;
- delayRegisterDelayIdPtr(&sc->delay_id);
#endif
}
/*
- * $Id: tools.cc,v 1.178 1999/05/04 21:58:45 wessels Exp $
+ * $Id: tools.cc,v 1.179 1999/05/19 19:57:56 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
static int call_id = 0;
double value = gb_to_double(g);
char *buf = bufs[call_id++];
+ if (call_id >= max_cc_calls)
+ call_id = 0;
/* select format */
if (value < 1e9)
snprintf(buf, sizeof(GbBuf), "%.2f MB", value / 1e6);
/*
- * $Id: tunnel.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $
+ * $Id: tunnel.cc,v 1.96 1999/05/19 19:57:50 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
}
#if DELAY_POOLS
/* no point using the delayIsNoDelay stuff since ssl is nice and simple */
- if (g && g->options.no_delay)
+ if (g && g->options.no_delay && sslState->delay_id) {
+ delayUnregisterDelayIdPtr(&sslState->delay_id);
sslState->delay_id = 0;
+ }
#endif
commConnectStart(sslState->server.fd,
sslState->host,